From 2c5d146913e55fef5c3d5d79e6c7e639e7a529fb Mon Sep 17 00:00:00 2001 From: Jason Persampieri Date: Mon, 15 Nov 2004 21:52:25 +0000 Subject: [PATCH] BUGFIX: assigning unique default names to Dialogs works now --- direct/src/gui/DirectDialog.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/direct/src/gui/DirectDialog.py b/direct/src/gui/DirectDialog.py index e0ae38c9ab..47ce2d5b34 100644 --- a/direct/src/gui/DirectDialog.py +++ b/direct/src/gui/DirectDialog.py @@ -81,7 +81,7 @@ class DirectDialog(DirectFrame): # Inherits from DirectFrame optiondefs = ( # Define type of DirectGuiWidget - ('dialogName', None, INITOPT), + ('dialogName', 'DirectDialog_' + `DirectDialog.PanelIndex`, INITOPT), # Default position is slightly forward in Y, so as not to # intersect the near plane, which is incorrectly set to 0 # in DX for some reason. @@ -118,8 +118,9 @@ class DirectDialog(DirectFrame): # Initialize superclasses DirectFrame.__init__(self, parent) - if not self['dialogName']: - self['dialogName'] = 'DirectDialog_' + `DirectDialog.PanelIndex` + #if not self['dialogName']: + # self['dialogName'] = 'DirectDialog_' + `DirectDialog.PanelIndex` + # Clean up any previously existing panel with the same unique # name. We don't allow any two panels with the same name to # coexist.