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