From 4fc2782a320d90b54ee76b5b8404e765dfc90fde Mon Sep 17 00:00:00 2001 From: Redmond Urbino Date: Fri, 26 Jan 2007 04:08:59 +0000 Subject: [PATCH] cleanup all leaking events that I get when I do a simple login then logout --- direct/src/gui/DirectDialog.py | 2 ++ direct/src/gui/DirectScrolledList.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/direct/src/gui/DirectDialog.py b/direct/src/gui/DirectDialog.py index 9bb194ad35..c54f015e64 100644 --- a/direct/src/gui/DirectDialog.py +++ b/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): diff --git a/direct/src/gui/DirectScrolledList.py b/direct/src/gui/DirectScrolledList.py index 822fca0082..313d666caa 100644 --- a/direct/src/gui/DirectScrolledList.py +++ b/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):