Don't traceback when wakeup() is called when the window has been destroyed.
This can happen when a torn-of Windows menu references closed windows. And Tim Peters claims that the Windows menu is his favorite to tear off...
This commit is contained in:
parent
f52cca9812
commit
2403b0c5d4
|
@ -48,6 +48,11 @@ class ListedToplevel(Toplevel):
|
||||||
return self.wm_title()
|
return self.wm_title()
|
||||||
|
|
||||||
def wakeup(self):
|
def wakeup(self):
|
||||||
self.tkraise()
|
try:
|
||||||
self.wm_deiconify()
|
self.tkraise()
|
||||||
self.focus_set()
|
self.wm_deiconify()
|
||||||
|
self.focus_set()
|
||||||
|
except TclError:
|
||||||
|
# This can happen when the window menu was torn off.
|
||||||
|
# Simply ignore it.
|
||||||
|
pass
|
||||||
|
|
Loading…
Reference in New Issue