@@ -651,6 +651,13 @@ def set_window_title(self, title):
651
651
class NavigationToolbar2QT (NavigationToolbar2 , QtWidgets .QToolBar ):
652
652
message = QtCore .Signal (str )
653
653
654
+ toolitems = [* NavigationToolbar2 .toolitems ]
655
+ toolitems .insert (
656
+ # Add 'customize' action after 'subplots'
657
+ [name for name , * _ in toolitems ].index ("Subplots" ) + 1 ,
658
+ ("Customize" , "Edit axis, curve and image parameters" ,
659
+ "qt4_editor_options" , "edit_parameters" ))
660
+
654
661
def __init__ (self , canvas , parent , coordinates = True ):
655
662
"""coordinates: should we show the coordinates on the right?"""
656
663
self .canvas = canvas
@@ -694,11 +701,6 @@ def _init_toolbar(self):
694
701
a .setCheckable (True )
695
702
if tooltip_text is not None :
696
703
a .setToolTip (tooltip_text )
697
- if text == 'Subplots' :
698
- a = self .addAction (self ._icon ("qt4_editor_options.png" ,
699
- icon_color ),
700
- 'Customize' , self .edit_parameters )
701
- a .setToolTip ('Edit axis, curve and image parameters' )
702
704
703
705
# Add the (x, y) location widget at the right side of the toolbar
704
706
# The stretch factor is 1 which means any resizing of the toolbar
0 commit comments