mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Break some cycles when the widget is destroyed.
This commit is contained in:
parent
624a191512
commit
7ea8f8404c
1 changed files with 8 additions and 0 deletions
|
@ -48,6 +48,10 @@ class Dialog(Toplevel):
|
|||
|
||||
self.wait_window(self)
|
||||
|
||||
def destroy(self):
|
||||
self.initial_focus = None
|
||||
Toplevel.destroy(self)
|
||||
|
||||
#
|
||||
# construction hooks
|
||||
|
||||
|
@ -131,6 +135,10 @@ class _QueryDialog(Dialog):
|
|||
|
||||
Dialog.__init__(self, parent, title)
|
||||
|
||||
def destroy(self):
|
||||
self.entry = None
|
||||
Dialog.destroy(self)
|
||||
|
||||
def body(self, master):
|
||||
|
||||
w = Label(master, text=self.prompt, justify=LEFT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue