aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/lluictrlfactory.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:50 -0500
committerJacek Antonelli2008-08-15 23:45:50 -0500
commit2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch)
tree95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/llui/lluictrlfactory.cpp
parentSecond Life viewer sources 1.20.6 (diff)
downloadmeta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz
Second Life viewer sources 1.20.7
Diffstat (limited to 'linden/indra/llui/lluictrlfactory.cpp')
-rw-r--r--linden/indra/llui/lluictrlfactory.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/linden/indra/llui/lluictrlfactory.cpp b/linden/indra/llui/lluictrlfactory.cpp
index cc8135c..7df6ebe 100644
--- a/linden/indra/llui/lluictrlfactory.cpp
+++ b/linden/indra/llui/lluictrlfactory.cpp
@@ -104,10 +104,17 @@ static LLRegisterWidget<LLUICtrlLocate> r2("pad");
104// LLUICtrlFactory() 104// LLUICtrlFactory()
105//----------------------------------------------------------------------------- 105//-----------------------------------------------------------------------------
106LLUICtrlFactory::LLUICtrlFactory() 106LLUICtrlFactory::LLUICtrlFactory()
107 : mDummyPanel(NULL)
107{ 108{
108 setupPaths(); 109 setupPaths();
109} 110}
110 111
112LLUICtrlFactory::~LLUICtrlFactory()
113{
114 delete mDummyPanel;
115 mDummyPanel = NULL;
116}
117
111void LLUICtrlFactory::setupPaths() 118void LLUICtrlFactory::setupPaths()
112{ 119{
113 LLString filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml"); 120 LLString filename = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "paths.xml");
@@ -428,10 +435,6 @@ void LLUICtrlFactory::rebuild()
428 435
429LLView *LLUICtrlFactory::createCtrlWidget(LLPanel *parent, LLXMLNodePtr node) 436LLView *LLUICtrlFactory::createCtrlWidget(LLPanel *parent, LLXMLNodePtr node)
430{ 437{
431 // panel for holding dummy widgets, so they have a parent for layout purposes, etc.
432 // does not manage lifetime of child widgets
433 static LLPanel dummy_panel;
434
435 LLString ctrl_type = node->getName()->mString; 438 LLString ctrl_type = node->getName()->mString;
436 LLString::toLower(ctrl_type); 439 LLString::toLower(ctrl_type);
437 440
@@ -445,7 +448,11 @@ LLView *LLUICtrlFactory::createCtrlWidget(LLPanel *parent, LLXMLNodePtr node)
445 448
446 if (parent == NULL) 449 if (parent == NULL)
447 { 450 {
448 parent = &dummy_panel; 451 if (mDummyPanel == NULL)
452 {
453 mDummyPanel = new LLPanel;
454 }
455 parent = mDummyPanel;
449 } 456 }
450 LLView *ctrl = func(node, parent, this); 457 LLView *ctrl = func(node, parent, this);
451 458