summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrlfactory.h
diff options
context:
space:
mode:
authorrichard <none@none>2009-12-17 11:49:41 -0800
committerrichard <none@none>2009-12-17 11:49:41 -0800
commitc84b6a28a0f99961d115f41d7238869dc92e728c (patch)
tree2ccae6ed053b1ce15e164de943a51211674e90eb /indra/llui/lluictrlfactory.h
parent7a3034f738b0b2523ca919789fe4e7241faa1359 (diff)
made setupParams do coordinate flipping and negative coordinate magic only for XUI-based params
Diffstat (limited to 'indra/llui/lluictrlfactory.h')
-rw-r--r--indra/llui/lluictrlfactory.h25
1 files changed, 4 insertions, 21 deletions
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index cad62c27de..6788f29ba9 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -184,6 +184,8 @@ public:
{
T* widget = NULL;
+ T::setupParams(params, parent);
+
if (!params.validateBlock())
{
llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl;
@@ -307,27 +309,8 @@ fail:
}
// Apply layout transformations, usually munging rect
- T::setupParams(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);
- }
+ params.from_xui = true;
+ T* widget = createWidget<T>(params, parent);
typedef typename T::child_registry_t registry_t;