summaryrefslogtreecommitdiff
path: root/indra/llui/lluictrl.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2020-01-28 21:40:35 +0200
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2020-01-28 21:40:35 +0200
commit9a3f1f6a3c4506ae08c7af7f92f11da40d80ef00 (patch)
treef32f56c49dc320442a0ed535bfbb167fe3fbf9ea /indra/llui/lluictrl.cpp
parentd656d49a77eeb65ae537c954ea4009bc22da7b2b (diff)
parent2998552f3d7447da316afdd1713595528596a0c5 (diff)
Merged lindenlab/viewer into master
Diffstat (limited to 'indra/llui/lluictrl.cpp')
-rw-r--r--indra/llui/lluictrl.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index df74e113e9..c98da0d410 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -137,13 +137,29 @@ void LLUICtrl::initFromParams(const Params& p)
{
LLControlVariable* control = findControl(p.enabled_controls.enabled);
if (control)
+ {
setEnabledControlVariable(control);
+ }
+ else
+ {
+ LL_WARNS() << "Failed to assign 'enabled' control variable to " << getName()
+ << ": control " << p.enabled_controls.enabled()
+ << " does not exist." << LL_ENDL;
+ }
}
else if(p.enabled_controls.disabled.isChosen())
{
LLControlVariable* control = findControl(p.enabled_controls.disabled);
if (control)
+ {
setDisabledControlVariable(control);
+ }
+ else
+ {
+ LL_WARNS() << "Failed to assign 'disabled' control variable to " << getName()
+ << ": control " << p.enabled_controls.disabled()
+ << " does not exist." << LL_ENDL;
+ }
}
}
if(p.controls_visibility.isProvided())
@@ -152,13 +168,29 @@ void LLUICtrl::initFromParams(const Params& p)
{
LLControlVariable* control = findControl(p.controls_visibility.visible);
if (control)
+ {
setMakeVisibleControlVariable(control);
+ }
+ else
+ {
+ LL_WARNS() << "Failed to assign visibility control variable to " << getName()
+ << ": control " << p.controls_visibility.visible()
+ << " does not exist." << LL_ENDL;
+ }
}
else if (p.controls_visibility.invisible.isChosen())
{
LLControlVariable* control = findControl(p.controls_visibility.invisible);
if (control)
+ {
setMakeInvisibleControlVariable(control);
+ }
+ else
+ {
+ LL_WARNS() << "Failed to assign invisibility control variable to " << getName()
+ << ": control " << p.controls_visibility.invisible()
+ << " does not exist." << LL_ENDL;
+ }
}
}
@@ -497,6 +529,11 @@ void LLUICtrl::setControlName(const std::string& control_name, LLView *context)
if (!control_name.empty())
{
LLControlVariable* control = context->findControl(control_name);
+ if (!control)
+ {
+ LL_WARNS() << "Failed to assign control variable to " << getName()
+ << ": control "<< control_name << " does not exist." << LL_ENDL;
+ }
setControlVariable(control);
}
}