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

Skip to content

Commit 2b58476

Browse files
authored
Merge pull request #28080 from meeseeksmachine/auto-backport-of-pr-28077-on-v3.9.x
Backport PR #28077 on branch v3.9.x (Parent tk StringVar to the canvas widget, not to the toolbar.)
2 parents f7aafc5 + 4c14098 commit 2b58476

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)