@@ -276,12 +276,15 @@ def get_object(self, object_id):
276
276
elif object_id == "actionPlay" :
277
277
# Find play/pause button on transport controls toolbar
278
278
for w in self .win .actionPlay .associatedWidgets ():
279
- if isinstance (w , QToolButton ):
279
+ if isinstance (w , QToolButton ) and w .isVisible ():
280
+ return w
281
+ for w in self .win .actionPause .associatedWidgets ():
282
+ if isinstance (w , QToolButton ) and w .isVisible ():
280
283
return w
281
284
elif object_id == "export_button" :
282
285
# Find export toolbar button on main window
283
- for w in self .win .actionExportVideo .associatedWidgets ():
284
- if isinstance (w , QToolButton ):
286
+ for w in reversed ( self .win .actionExportVideo .associatedWidgets () ):
287
+ if isinstance (w , QToolButton ) and w . isVisible () and w . parent () == self . win . toolBar :
285
288
return w
286
289
287
290
def next_tip (self , tid ):
@@ -374,7 +377,8 @@ def re_position_dialog(self):
374
377
375
378
def process_visibility (self ):
376
379
"""Handle callbacks when widget visibility changes"""
377
- self .tutorial_timer .start ()
380
+ if self .tutorial_enabled :
381
+ self .tutorial_timer .start ()
378
382
379
383
def __init__ (self , win , * args ):
380
384
# Init QObject superclass
@@ -481,7 +485,3 @@ def __init__(self, win, *args):
481
485
self .win .dockProperties .visibilityChanged .connect (self .process_visibility )
482
486
self .win .dockVideo .visibilityChanged .connect (self .process_visibility )
483
487
self .win .dockEmojis .visibilityChanged .connect (self .process_visibility )
484
-
485
- # Process tutorials (1 by 1)
486
- if self .tutorial_enabled :
487
- self .process_visibility ()
0 commit comments