summaryrefslogtreecommitdiff
path: root/indra/llui/llcombobox.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:42:32 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 21:42:32 +0300
commit28ddde936d1a43f6d702504f868ec3cc7ec4f60e (patch)
treeccc06eb3ae7922442c7b9a970ff6689eb6bef9dc /indra/llui/llcombobox.cpp
parent07f1c4c9c59c3b825a605dd9c695aae492bbf09c (diff)
parent34322f8f37380df868703051230f2a4109602b3f (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/llui/llcombobox.cpp')
-rw-r--r--indra/llui/llcombobox.cpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 00a933a0bb..b2ad38bddf 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -243,7 +243,14 @@ LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOO
item->setEnabled(enabled);
if (!mAllowTextEntry && mLabel.empty())
{
- selectFirstItem();
+ if (mControlVariable)
+ {
+ setValue(mControlVariable->getValue()); // selects the appropriate item
+ }
+ else
+ {
+ selectFirstItem();
+ }
}
return item;
}
@@ -255,7 +262,14 @@ LLScrollListItem* LLComboBox::add(const std::string& name, const LLUUID& id, EAd
item->setEnabled(enabled);
if (!mAllowTextEntry && mLabel.empty())
{
- selectFirstItem();
+ if (mControlVariable)
+ {
+ setValue(mControlVariable->getValue()); // selects the appropriate item
+ }
+ else
+ {
+ selectFirstItem();
+ }
}
return item;
}
@@ -268,7 +282,14 @@ LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddP
item->setUserdata( userdata );
if (!mAllowTextEntry && mLabel.empty())
{
- selectFirstItem();
+ if (mControlVariable)
+ {
+ setValue(mControlVariable->getValue()); // selects the appropriate item
+ }
+ else
+ {
+ selectFirstItem();
+ }
}
return item;
}
@@ -280,7 +301,14 @@ LLScrollListItem* LLComboBox::add(const std::string& name, LLSD value, EAddPosit
item->setEnabled(enabled);
if (!mAllowTextEntry && mLabel.empty())
{
- selectFirstItem();
+ if (mControlVariable)
+ {
+ setValue(mControlVariable->getValue()); // selects the appropriate item
+ }
+ else
+ {
+ selectFirstItem();
+ }
}
return item;
}