Skip to content

Commit

Permalink
Do not show the same frame, just wait for a next iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
pozitronik committed Mar 11, 2024
1 parent 0461174 commit 1650962
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sinner/gui/GUIModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ def _process_frame(self, frame_index: int) -> float | None:
return frame_render_time.execution_time

def _show_frames(self) -> None:
last_shown_frame_index: int = -1
if self.Player:
while self._event_playback.is_set():
start_time = time.perf_counter()
Expand All @@ -492,8 +493,9 @@ def _show_frames(self) -> None:
self.update_status("No more frames in the timeline")
self._event_playback.clear()
break
if n_frame is not None:
if n_frame is not None and n_frame.index != last_shown_frame_index:
self.Player.show_frame(n_frame.frame)
last_shown_frame_index = n_frame.index
if self.TimeLine.last_returned_index is None:
self._status("Time position", "There are no ready frames")
else:
Expand Down

0 comments on commit 1650962

Please sign in to comment.