From 29ca0f064d56d957839aa05d94786b0c2d5ad5e5 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 6 Oct 2009 21:09:54 +0000 Subject: fix for gcc --- indra/llui/lluictrlfactory.cpp | 8 ++++++++ indra/llui/lluictrlfactory.h | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'indra/llui') 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); -- cgit v1.2.3