summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-10-06 21:09:54 +0000
committerRichard Nelson <richard@lindenlab.com>2009-10-06 21:09:54 +0000
commit29ca0f064d56d957839aa05d94786b0c2d5ad5e5 (patch)
treed8f26341a5b6174f8507521ef688189176fdfd6f /indra/llui
parentea9b1de0271c093f2d16f56878989d867d192b61 (diff)
fix for gcc
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lluictrlfactory.cpp8
-rw-r--r--indra/llui/lluictrlfactory.h7
2 files changed, 13 insertions, 2 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index d8633453a8..4ce6677294 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -379,6 +379,14 @@ BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const std::string& na
return res;
}
+//static
+void LLUICtrlFactory::setCtrlParent(LLView* view, LLView* parent, S32 tab_group)
+{
+ if (tab_group < 0) tab_group = parent->getLastTabGroup();
+ parent->addChild(view, tab_group);
+}
+
+
// Avoid directly using LLUI and LLDir in the template code
//static
std::string LLUICtrlFactory::findSkinnedFilename(const std::string& filename)
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 5a028702e7..3c77c655b8 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -295,8 +295,8 @@ fail:
if (parent)
{
- S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : parent->getLastTabGroup();
- parent->addChild(widget, tab_group);
+ S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : -1;
+ setCtrlParent(widget, parent, tab_group);
}
typedef typename T::child_registry_t registry_t;
@@ -321,6 +321,9 @@ fail:
static void loadWidgetTemplate(const std::string& widget_tag, LLInitParam::BaseBlock& block);
private:
+ // this exists to get around dependency on llview
+ static void setCtrlParent(LLView* view, LLView* parent, S32 tab_group);
+
// Avoid directly using LLUI and LLDir in the template code
static std::string findSkinnedFilename(const std::string& filename);