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 a8fa7a9

Browse filesBrowse files
author
Federico Ariza
committed
fix bug in tkinter python3.6
1 parent baa5f8e commit a8fa7a9
Copy full SHA for a8fa7a9

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+8
-1
lines changed

‎lib/matplotlib/backends/backend_tkagg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_tkagg.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,9 +913,16 @@ def _Button(self, text, image_file, toggle, frame):
913913
b = Tk.Button(master=frame, text=text, padx=2, pady=2, image=im,
914914
command=lambda: self._button_click(text))
915915
else:
916+
# There is a bug in tkinter included in some python 3.6 versions
917+
# that without this variable, produces a "visual" toggling of
918+
# other near checkbuttons
919+
# https://bugs.python.org/issue29402
920+
# https://bugs.python.org/issue25684
921+
var = Tk.IntVar()
916922
b = Tk.Checkbutton(master=frame, text=text, padx=2, pady=2,
917923
image=im, indicatoron=False,
918-
command=lambda: self._button_click(text))
924+
command=lambda: self._button_click(text),
925+
variable=var)
919926
b._ntimage = im
920927
b.pack(side=Tk.LEFT)
921928
return b

0 commit comments

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