gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)

Previously, checkbuttons in different parent widgets could have the same
short name and share the same state if arguments "name" and "variable" are
not specified. Now they are globally unique.
(cherry picked from commit adbed2d542)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-09-27 04:39:31 -07:00 committed by GitHub
parent 2e315d87ff
commit dc0a87d9a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 58 additions and 3 deletions

View file

@ -310,7 +310,7 @@ class TixWidget(tkinter.Widget):
del cnf[k]
self.widgetName = widgetName
Widget._setup(self, master, cnf)
self._setup(master, cnf)
# If widgetName is None, this is a dummy creation call where the
# corresponding Tk widget has already been created by Tix