Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 364a67b

Browse files
authored
Merge pull request matplotlib#28077 from anntzer/tktm
Parent tk StringVar to the canvas widget, not to the toolbar.
2 parents 9955a7c + ddaaa0e commit 364a67b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/_backend_tk.py

Lines 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)