File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ class PlayCtrl:
361361 def __init__ (self ):
362362 self .count = settings .CONFIG .getint ('DEFAULT' , 'Repeat Count' )
363363 self .infinite = settings .CONFIG .getboolean ('DEFAULT' , 'Infinite Playback' )
364+ self .count_was_updated = False
364365
365366 def play (self , capture , toggle_button ):
366367 """Play the loaded capture."""
@@ -380,6 +381,9 @@ def action(self, event):
380381 toggle_button .Parent .panel .SetFocus ()
381382 self .infinite = settings .CONFIG .getboolean ('DEFAULT' , 'Infinite Playback' )
382383 if toggle_button .Value :
384+ if not self .count_was_updated :
385+ self .count = settings .CONFIG .getint ('DEFAULT' , 'Repeat Count' )
386+ self .count_was_updated = True
383387 if TMP_PATH is None or not os .path .isfile (TMP_PATH ):
384388 wx .LogError ("No capture loaded" )
385389 toggle_button .Value = False
@@ -395,7 +399,7 @@ def action(self, event):
395399 self .play_thread .start ()
396400 else :
397401 self .play_thread .end ()
398- self .count = settings . CONFIG . getint ( 'DEFAULT' , 'Repeat Count' )
402+ self .count_was_updated = False
399403 settings .save_config ()
400404
401405
You can’t perform that action at this time.
0 commit comments