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 e3d2166

Browse filesBrowse files
tacaswellMeeseeksDev[bot]
authored andcommitted
Backport PR #11694: moving toolmanager initialization up before toolbar
1 parent d3db42c commit e3d2166
Copy full SHA for e3d2166

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,13 @@ def __init__(self, canvas, num, window):
472472
self.window.withdraw()
473473
self.set_window_title("Figure %d" % num)
474474
self.canvas = canvas
475+
# If using toolmanager it has to be present when initializing the toolbar
476+
self.toolmanager = self._get_toolmanager()
475477
# packing toolbar first, because if space is getting low, last packed widget is getting shrunk first (-> the canvas)
476478
self.toolbar = self._get_toolbar()
477479
self.canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
478480
self._num = num
479481

480-
self.toolmanager = self._get_toolmanager()
481482
self.statusbar = None
482483

483484
if self.toolmanager:

0 commit comments

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