Skip to content

Commit

Permalink
new wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierfriard committed Nov 20, 2023
1 parent 4aec742 commit cee7272
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions boris/event_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import logging
import copy
import time
from decimal import Decimal as dec
from decimal import InvalidOperation
from decimal import ROUND_DOWN
Expand Down Expand Up @@ -98,9 +99,11 @@ def add_event(self):
if editWindow.leComment.toPlainText():
event[cfg.COMMENT] = editWindow.leComment.toPlainText()

# determine the frame index
if self.playerType == cfg.MEDIA:
mem_time = self.getLaps()
if not self.seek_mediaplayer(newTime):
time.sleep(0.1)
frame_idx = self.get_frame_index()
event[cfg.FRAME_INDEX] = frame_idx
self.seek_mediaplayer(mem_time)
Expand Down Expand Up @@ -679,8 +682,10 @@ def edit_event(self):

event[cfg.COMMENT] = edit_window.leComment.toPlainText()

# determine the new frame index
if self.pj[cfg.OBSERVATIONS][self.observationId][cfg.TYPE] == cfg.MEDIA:
if self.playerType == cfg.MEDIA:
time.sleep(0.1)
mem_time = self.getLaps()
if not self.seek_mediaplayer(new_time):
frame_idx = self.get_frame_index()
Expand Down Expand Up @@ -825,6 +830,8 @@ def edit_time_selected_events(self):
if not self.seek_mediaplayer(
self.pj[cfg.OBSERVATIONS][self.observationId][cfg.EVENTS][pj_event_idx][cfg.PJ_OBS_FIELDS[self.playerType][cfg.TIME]]
):
# determine the new frame index
time.sleep(0.1)
frame_idx = self.get_frame_index()
if len(self.pj[cfg.OBSERVATIONS][self.observationId][cfg.EVENTS][pj_event_idx]) == 6:
self.pj[cfg.OBSERVATIONS][self.observationId][cfg.EVENTS][pj_event_idx][-1] = frame_idx
Expand Down
2 changes: 1 addition & 1 deletion boris/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@


__version__ = "8.22.4"
__version_date__ = "2023-11-14"
__version_date__ = "2023-11-20"
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[project]
name = "boris-behav-obs"
# BEGIN_OUTPUT TAG=version
version = "8.22.3"
version = "8.22.4"
# END_OUTPUT
description = "BORIS - Behavioral Observation Research Interactive Software"
authors = [{ name="Olivier Friard", email="[email protected]" }]
Expand Down Expand Up @@ -70,7 +70,7 @@ exclude = ["*_ui.py", "mpv*"]

[tool.bumpver]
# BEGIN_OUTPUT TAG=current_version
current_version = "8.22.3"
current_version = "8.22.4"
# END_OUTPUT
version_pattern = "MAJOR.MINOR.PATCH"

Expand Down

0 comments on commit cee7272

Please sign in to comment.