@@ -110,6 +110,13 @@ def __init__(self, app, config, ok_config, icon, title, version, debug=False, ab
110110 visible_onetime_tasks = [task for task in self .executor .onetime_tasks if getattr (task , 'visible' , True )]
111111 visible_trigger_tasks = [task for task in self .executor .trigger_tasks if getattr (task , 'visible' , True )]
112112
113+ if len (visible_trigger_tasks ) > 0 :
114+ from ok .gui .tasks .TriggerTaskTab import TriggerTaskTab
115+ self .trigger_tab = TriggerTaskTab ()
116+ if self .first_task_tab is None :
117+ self .first_task_tab = self .trigger_tab
118+ self .addSubInterface (self .trigger_tab , FluentIcon .STOP_WATCH , self .tr ('Triggers' ))
119+
113120 if visible_onetime_tasks :
114121 from ok .gui .tasks .OneTimeTaskTab import OneTimeTaskTab
115122 from collections import defaultdict
@@ -139,13 +146,6 @@ def __init__(self, app, config, ok_config, icon, title, version, debug=False, ab
139146 self .addSubInterface (group_tab , group_icon , self .app .tr (group_name ))
140147 self .grouped_task_tabs .append (group_tab )
141148
142- if len (visible_trigger_tasks ) > 0 :
143- from ok .gui .tasks .TriggerTaskTab import TriggerTaskTab
144- self .trigger_tab = TriggerTaskTab ()
145- if self .first_task_tab is None :
146- self .first_task_tab = self .trigger_tab
147- self .addSubInterface (self .trigger_tab , FluentIcon .ROBOT , self .tr ('Triggers' ))
148-
149149 # Add custom tabs that should appear after built-in task tabs
150150 for tab_obj in after_custom_tabs :
151151 self .addSubInterface (tab_obj , tab_obj .icon , tab_obj .name , position = tab_obj .position )
0 commit comments