File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -363,6 +363,10 @@ def runScript(self):
363363 if self .vm .vars :
364364 self .dashboardController .buildInterface (self .vm .vars )
365365
366+ # Run the setup routine (if it exists)
367+ if success :
368+ success = self .invoke ("setup" )
369+
366370 if not success or not self .vm .animated :
367371 # halt the progress indicator if we crashed (or if we succeeded in a non-anim)
368372 self .statusView .endRun ()
@@ -376,10 +380,6 @@ def runScript(self):
376380
377381 # Check whether we are dealing with animation
378382 if self .vm .animated :
379-
380- # Run setup routine
381- self .invoke ("setup" )
382-
383383 if not self .vm .crashed :
384384 # calling speed(0) just draws the first frame, so bail out before repeating
385385 if self .vm .speed <= 0 :
@@ -392,7 +392,6 @@ def runScript(self):
392392 # Start the timer
393393 self .animationTimer = set_timeout (self , 'step' , 1.0 / self .vm .speed , repeat = True )
394394
395-
396395 def step (self ):
397396 """Keep calling the script's draw method until an error occurs or the animation complete."""
398397 ok = self .invoke ("draw" )
You can’t perform that action at this time.
0 commit comments