@@ -218,6 +218,8 @@ def __init__(self, parent, name=None, run_workbox=False, standalone=False):
218218        self .uiGroup8ACT .triggered .connect (partial (self .gotoGroupByIndex , 8 ))
219219        self .uiGroupLastACT .triggered .connect (partial (self .gotoGroupByIndex , - 1 ))
220220
221+         self .uiRunFirstWorkboxACT .triggered .connect (self .run_first_workbox )
222+ 
221223        self .uiFocusNameACT .triggered .connect (self .show_focus_name )
222224
223225        self .uiCommentToggleACT .triggered .connect (self .comment_toggle )
@@ -437,8 +439,13 @@ def workbox_for_name(cls, name, show=False, visible=False):
437439
438440        return  workbox 
439441
442+     def  run_first_workbox (self ):
443+         print ("# Run first Workbox" )
444+         workbox  =  self .uiWorkboxTAB .widget (0 ).widget (0 )
445+         self .run_workbox ("" , workbox = workbox )
446+ 
440447    @classmethod  
441-     def  run_workbox (cls , name ):
448+     def  run_workbox (cls , name ,  workbox = None ):
442449        """This is a function which will be added to __main__, and therefore 
443450        available to PythonLogger users. It will accept a string matching the 
444451        "{group}/{workbox}" format, or a boolean that will run the current tab 
@@ -456,7 +463,8 @@ def run_workbox(cls, name):
456463            run_workbox('some/stuff.py') 
457464            (from command line): blurdev launch Python_Logger --run_workbox 
458465        """ 
459-         workbox  =  cls .workbox_for_name (name )
466+         if  workbox  is  None :
467+             workbox  =  cls .workbox_for_name (name )
460468
461469        if  workbox  is  not   None :
462470            # if name is True, its ok to run the workbox, this option 
0 commit comments