From b760defb50fcf4c312feba9ced50b9dc4d664c09 Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Sat, 6 May 2006 05:43:34 +0000 Subject: [PATCH] enabled base.guiItems as an e3 hack --- direct/src/gui/DirectGuiBase.py | 4 ++-- direct/src/showbase/ShowBase.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/gui/DirectGuiBase.py b/direct/src/gui/DirectGuiBase.py index 1aea2f67dc..7cacabc40c 100644 --- a/direct/src/gui/DirectGuiBase.py +++ b/direct/src/gui/DirectGuiBase.py @@ -715,7 +715,7 @@ class DirectGuiWidget(DirectGuiBase, NodePath): if self['guiId']: self.guiItem.setId(self['guiId']) self.guiId = self.guiItem.getId() - if __dev__: + if __dev__ or base.cr.wantE3hacks: # track gui items by guiId for tracking down leaks if hasattr(base, 'guiItems'): if self.guiId in base.guiItems: @@ -1008,7 +1008,7 @@ class DirectGuiWidget(DirectGuiBase, NodePath): self.updateFrameStyle() def destroy(self): - if __dev__: + if __dev__ or base.cr.wantE3hacks: if hasattr(base, 'guiItems'): if self.guiId in base.guiItems: del base.guiItems[self.guiId] diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index bac715502a..cafd8a0dd2 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -248,7 +248,7 @@ class ShowBase(DirectObject.DirectObject): ShowBase.notify.info('__dev__ == %s' % __dev__) - if __dev__: + if __dev__ or self.config.GetBool('want-e3-hacks', False): if self.config.GetBool('track-gui-items', True): # dict of guiId to gui item, for tracking down leaks self.guiItems = {}