aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJacek Antonelli2010-08-01 03:04:45 -0500
committerJacek Antonelli2010-08-01 03:04:45 -0500
commitc47afb87609e9843f83ca194f7cdb76fa1aea697 (patch)
tree12e31ce5405c5aeb331d4c7eb0c5e566e33d779a
parentGet user confirmation even when using default Windlight settings. (diff)
downloadmeta-impy-c47afb87609e9843f83ca194f7cdb76fa1aea697.zip
meta-impy-c47afb87609e9843f83ca194f7cdb76fa1aea697.tar.gz
meta-impy-c47afb87609e9843f83ca194f7cdb76fa1aea697.tar.bz2
meta-impy-c47afb87609e9843f83ca194f7cdb76fa1aea697.tar.xz
LLComboBox now properly respects control_name.
-rw-r--r--linden/indra/llui/llcombobox.cpp16
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