]> granicus.if.org Git - python/commitdiff
When deleting, call the callbacks *after* deleting the window from our list!
authorGuido van Rossum <guido@python.org>
Wed, 17 Feb 1999 17:34:25 +0000 (17:34 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 17 Feb 1999 17:34:25 +0000 (17:34 +0000)
Tools/idle/WindowList.py

index b820089cbb9b72a6e2c56780354d463baa1bdd7b..cee435d2f1f158a0ca3c0633c3d1f2715f9e503e 100644 (file)
@@ -11,12 +11,12 @@ class WindowList:
         self.dict[str(window)] = window
 
     def delete(self, window):
-        window.after_idle(self.call_callbacks)
         try:
             del self.dict[str(window)]
         except KeyError:
             # Sometimes, destroy() is called twice
             pass
+        self.call_callbacks()
 
     def add_windows_to_menu(self,  menu):
         list = []
@@ -56,7 +56,6 @@ registry = WindowList()
 add_windows_to_menu = registry.add_windows_to_menu
 register_callback = registry.register_callback
 unregister_callback = registry.unregister_callback
-call_callbacks = registry.call_callbacks
 
 
 class ListedToplevel(Toplevel):