File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -521,9 +521,13 @@ def get_frame():
521521 self .initialized = True
522522
523523 def step_forward (self , state ):
524+ if self .animation_timer is not None :
525+ self .stop_animating ()
524526 self .canvas .animate .draw_frame ((self .canvas .animate .frame_num + 1 ) % self .canvas .animate .number_of_frames (), allow_static = False , render_offscreen = False )
525527
526528 def step_back (self , state ):
529+ if self .animation_timer is not None :
530+ self .stop_animating ()
527531 self .canvas .animate .draw_frame ((self .canvas .animate .frame_num - 1 ) % self .canvas .animate .number_of_frames (), allow_static = False , render_offscreen = False )
528532
529533 def save_animation_press (self , state ):
@@ -607,8 +611,11 @@ def stop_animating(self):
607611 if self .animation_timer is not None :
608612 t , self .animation_timer = self .animation_timer , None
609613 self .interactor .DestroyTimer (t )
614+ self .anim_button .set_state (0 )
610615
611616 def set_animation_frame (self , value ):
617+ if self .animation_timer is not None :
618+ self .stop_animating ()
612619 value = int (value )
613620 self .canvas .animate .draw_frame (value , allow_static = False , render_offscreen = False )
614621 return value
You can’t perform that action at this time.
0 commit comments