@@ -651,6 +651,13 @@ def set_window_title(self, title):
651651class NavigationToolbar2QT (NavigationToolbar2 , QtWidgets .QToolBar ):
652652 message = QtCore .Signal (str )
653653
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+
654661 def __init__ (self , canvas , parent , coordinates = True ):
655662 """coordinates: should we show the coordinates on the right?"""
656663 self .canvas = canvas
@@ -694,11 +701,6 @@ def _init_toolbar(self):
694701 a .setCheckable (True )
695702 if tooltip_text is not None :
696703 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' )
702704
703705 # Add the (x, y) location widget at the right side of the toolbar
704706 # The stretch factor is 1 which means any resizing of the toolbar
0 commit comments