Skip to content

Commit

Permalink
Merge pull request #377 from nauaneed/viewer-playback-buttons
Browse files Browse the repository at this point in the history
Issues with play
  • Loading branch information
prabhuramachandran authored Apr 21, 2023
2 parents ebf4bbf + 0604675 commit 16b3b0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pysph/tools/mayavi_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,6 @@ class MayaviViewer(HasTraits):
height=_pbcbh,
tooltip='Previous File'),
Item('play_pause_button',
enabled_when='file_count < _n_files',
show_label=False,
tooltip='Play/Pause',
editor=ButtonEditor(
Expand Down Expand Up @@ -1166,6 +1165,9 @@ def _file_count_changed(self, value):
if self.record:
self._do_snap()

if self.play:
self._play_changed(self.play)

def _loop_changed(self, value):
if value and self.play:
self._play_changed(self.play)
Expand Down Expand Up @@ -1201,7 +1203,6 @@ def _play_event(self):
else:
self.timer.Stop()
pc = nf
self.play = False
elif pc < 0:
if self.loop:
pc = nf
Expand Down

0 comments on commit 16b3b0b

Please sign in to comment.