Skip to content

Commit

Permalink
Merge pull request #442 from Scottacus64/patch-1
Browse files Browse the repository at this point in the history
Update image.py
  • Loading branch information
toomanybrians authored Apr 22, 2023
2 parents 3d63b5f + 04424e8 commit 6be433c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpfmc/widgets/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ def _image_loaded(self, *args) -> None:
if self._image.image.anim_available:
self.fps = self.config['fps']
self.loops = self.config['loops']
self.start_frame = self._image.image.anim_index if self._image.frame_persist else self.config['start_frame']
self.start_frame = self._image.image.anim_index +1 if self._image.frame_persist else self.config['start_frame']
# If not auto playing, set the end index to be the start frame
if not self.config['auto_play']:
# Frame numbers start at 1 and indexes at 0, so subtract 1
self._end_index = self.start_frame - 1
self.play(start_frame=self.start_frame, auto_play=self.config['auto_play'])

# If this image should persist its animation frame on future loads, set that now
if self._image.config.get('persist_frame'):
if self._image.config.get('frame_persist'):
self._image.frame_persist = True

def _on_texture_change(self, *args) -> None:
Expand Down

0 comments on commit 6be433c

Please sign in to comment.