summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorrichard <none@none>2009-12-15 19:50:17 -0800
committerrichard <none@none>2009-12-15 19:50:17 -0800
commit1a4047c590443fac682b53ceb18a631b350f03b7 (patch)
tree53ce39af60c526b43a9aba183e55d9b6106b0fe6 /indra/llui
parenta183fb9f5efd5c49a0da7442dd8b7202db6167e7 (diff)
parent943cae62dbe41472b4515edbfca8a12e83dd6936 (diff)
merge
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lluictrlfactory.cpp2
-rw-r--r--indra/llui/lluictrlfactory.h25
2 files changed, 23 insertions, 4 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 40b22f515a..01715c2792 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -455,4 +455,4 @@ dummy_widget_creator_func_t* LLUICtrlFactory::getDefaultWidgetFunc(const std::ty
const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_type)
{
return LLWidgetNameRegistry::instance().getValue(widget_type);
-} \ No newline at end of file
+}
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 9d26a9c9ef..422a926e49 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -196,7 +196,7 @@ public:
}
{
LLFastTimer timer(FTM_INIT_FROM_PARAMS);
- widget->initFromParams(params);
+ widget->initFromParams(params);
}
if (parent)
@@ -220,7 +220,7 @@ public:
return widget;
}
-
+
LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t&, LLXMLNodePtr output_node );
template<typename T>
@@ -309,9 +309,28 @@ fail:
// Apply layout transformations, usually munging rect
T::setupParams(params, parent);
- T* widget = createWidget<T>(params, parent);
+ if (!params.validateBlock())
+ {
+ llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
+ }
+ T* widget;
+ {
+ LLFastTimer timer(FTM_WIDGET_CONSTRUCTION);
+ widget = new T(params);
+ }
+ {
+ LLFastTimer timer(FTM_INIT_FROM_PARAMS);
+ widget->initFromParams(params);
+ }
+ if (parent)
+ {
+ S32 tab_group = params.tab_group.isProvided() ? params.tab_group() : -1;
+ setCtrlParent(widget, parent, tab_group);
+ }
+
typedef typename T::child_registry_t registry_t;
+
createChildren(widget, node, registry_t::instance(), output_node);
if (widget && !widget->postBuild())