From e957fc84fde429433c1ed8a205474b5a6a90654b Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Fri, 14 Aug 2020 12:30:36 -0700 Subject: [PATCH] Backport PR #18260: Add parent widget to IntVar --- lib/matplotlib/backends/_backend_tk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/_backend_tk.py b/lib/matplotlib/backends/_backend_tk.py index 267887db908c..d2bcbace5230 100644 --- a/lib/matplotlib/backends/_backend_tk.py +++ b/lib/matplotlib/backends/_backend_tk.py @@ -575,7 +575,7 @@ def _Button(self, text, image_file, toggle, command): # other near checkbuttons # https://bugs.python.org/issue29402 # https://bugs.python.org/issue25684 - var = tk.IntVar() + var = tk.IntVar(master=self) b = tk.Checkbutton( master=self, text=text, image=image, command=command, indicatoron=False, variable=var)