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 ddaaa0e

Browse filesBrowse files
committed
Parent tk StringVar to the canvas widget, not to the toolbar.
... because the toolbar may be a fake object (when using rcParams["toolbar"] = "toolmanager"). Try with `rcParams["toolbar"] = "toolmanager; use("tkagg")` and interactively saving the picture. No automated tests, sorry.
1 parent 2360c59 commit ddaaa0e
Copy full SHA for ddaaa0e

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-1
lines changed

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ def save_figure(self, *args):
843843

844844
default_extension = self.canvas.get_default_filetype()
845845
default_filetype = self.canvas.get_supported_filetypes()[default_extension]
846-
filetype_variable = tk.StringVar(self, default_filetype)
846+
filetype_variable = tk.StringVar(self.canvas.get_tk_widget(), default_filetype)
847847

848848
# adding a default extension seems to break the
849849
# asksaveasfilename dialog when you choose various save types

0 commit comments

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