Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 663a429

Browse filesBrowse files
authored
Merge pull request #15262 from anntzer/qtfigureoptions
MNT: Declare qt figureoptions tool in toolitems.
2 parents 8189978 + c5b42a2 commit 663a429
Copy full SHA for 663a429

File tree

Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-5
lines changed

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,13 @@ def set_window_title(self, title):
651651
class 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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.