diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-03-01 02:28:15 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-03-01 02:28:15 +0200 |
commit | 27e197459da275d2cd8847aa36e6c6bc4720e5c5 (patch) | |
tree | fccc0ceaac90e03939d37e54cb8519a0132993cf /indra/llui/llcombobox.cpp | |
parent | 1a1465dab94a2829cedb4ee4cd0c0169cea0fdeb (diff) | |
parent | 2ab914a9cdd1ad809879aca05dbf4b624949ecea (diff) |
Merge
Diffstat (limited to 'indra/llui/llcombobox.cpp')
-rw-r--r-- | indra/llui/llcombobox.cpp | 36 |
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; } |