@@ -355,6 +355,7 @@ def __new__(cls, *args, captionTitle=None, **kwargs):
355
355
self .__statusbar_action = None # type: Optional[QAction]
356
356
self .__menubar_action = None
357
357
self .__menubar_visible_timer = None
358
+ self .__toggle_control_area_action = None
358
359
359
360
# this action is enabled by the canvas framework
360
361
self .__help_action = QAction (
@@ -402,8 +403,6 @@ def __new__(cls, *args, captionTitle=None, **kwargs):
402
403
self .__visual_settings_action .setEnabled (True )
403
404
self .__visual_settings_action .setVisible (True )
404
405
405
- self .addAction (self .__help_action )
406
-
407
406
self .__copy_action = QAction (
408
407
"Copy to Clipboard" , self , objectName = "action-copy-to-clipboard" ,
409
408
shortcut = QKeySequence .Copy , enabled = False , visible = False
@@ -530,7 +529,7 @@ def __new__(cls, *args, captionTitle=None, **kwargs):
530
529
helpaction .menu ().addAction (self .__quick_help_action )
531
530
532
531
if self .__splitter is not None and self .__splitter .count () > 1 :
533
- action = QAction (
532
+ self . __toggle_control_area_action = action = QAction (
534
533
"Show Control Area" , self ,
535
534
objectName = "action-show-control-area" ,
536
535
shortcut = QKeySequence ("Ctrl+Shift+D" ),
@@ -545,6 +544,21 @@ def __new__(cls, *args, captionTitle=None, **kwargs):
545
544
if self .__menubar_action is not None :
546
545
viewaction .menu ().addAction (self .__menubar_action )
547
546
547
+ actions = (
548
+ self .__help_action ,
549
+ self .__report_action ,
550
+ self .__save_image_action ,
551
+ self .__reset_action ,
552
+ self .__visual_settings_action ,
553
+ self .__copy_action ,
554
+ self .__minimize_action ,
555
+ self .__close_action ,
556
+ self .__menubar_action ,
557
+ self .__quick_help_action ,
558
+ self .__toggle_control_area_action ,
559
+ )
560
+ self .addActions (list (filter (None , actions )))
561
+
548
562
if self .controlArea is not None :
549
563
# Otherwise, the first control has focus
550
564
self .controlArea .setFocus (Qt .OtherFocusReason )
0 commit comments