Browse Source

cleanup all leaking events that I get when I do a simple login then logout

Redmond Urbino 19 years ago
parent
commit
4fc2782a32
2 changed files with 4 additions and 0 deletions
  1. 2 0
      direct/src/gui/DirectDialog.py
  2. 2 0
      direct/src/gui/DirectScrolledList.py

+ 2 - 0
direct/src/gui/DirectDialog.py

@@ -334,6 +334,8 @@ class DirectDialog(DirectFrame):
     def destroy(self):
         if self['fadeScreen']:
             base.transitions.noTransitions()
+        for button in self.buttonList:
+            button.destroy()
         DirectFrame.destroy(self)
 
 class OkDialog(DirectDialog):

+ 2 - 0
direct/src/gui/DirectScrolledList.py

@@ -144,6 +144,8 @@ class DirectScrolledList(DirectFrame):
         taskMgr.remove(self.taskName("scroll"))
         if hasattr(self, "currentSelected"):
             del self.currentSelected
+        self.incButton.destroy()
+        self.decButton.destroy()
         DirectFrame.destroy(self)
 
     def selectListItem(self, item):