enabled base.guiItems as an e3 hack
This commit is contained in:
parent
36c3d27464
commit
b760defb50
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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 = {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue