diff options
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/llui/llcombobox.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index ce75f03..be34325 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp | |||
@@ -213,6 +213,21 @@ LLView* LLComboBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory * | |||
213 | combo_box->selectFirstItem(); | 213 | combo_box->selectFirstItem(); |
214 | } | 214 | } |
215 | 215 | ||
216 | const std::string& control_name = combo_box->getControlName(); | ||
217 | if (!control_name.empty()) | ||
218 | { | ||
219 | LLControlVariable* control = combo_box->findControl(control_name); | ||
220 | if (control != NULL) | ||
221 | { | ||
222 | combo_box->setValue( control->getValue() ); | ||
223 | } | ||
224 | else | ||
225 | { | ||
226 | llwarns << "combo_box \"" << name << "\" has control_name \"" | ||
227 | << control_name << "\", but control is NULL." << llendl; | ||
228 | } | ||
229 | } | ||
230 | |||
216 | return combo_box; | 231 | return combo_box; |
217 | } | 232 | } |
218 | 233 | ||
@@ -244,6 +259,7 @@ void LLComboBox::onCommit() | |||
244 | mTextEntry->setValue(getSimple()); | 259 | mTextEntry->setValue(getSimple()); |
245 | mTextEntry->setTentative(FALSE); | 260 | mTextEntry->setTentative(FALSE); |
246 | } | 261 | } |
262 | setControlValue( getValue() ); | ||
247 | LLUICtrl::onCommit(); | 263 | LLUICtrl::onCommit(); |
248 | } | 264 | } |
249 | 265 | ||