From c47afb87609e9843f83ca194f7cdb76fa1aea697 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 1 Aug 2010 03:04:45 -0500 Subject: LLComboBox now properly respects control_name. --- linden/indra/llui/llcombobox.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'linden/indra/llui') 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 * combo_box->selectFirstItem(); } + const std::string& control_name = combo_box->getControlName(); + if (!control_name.empty()) + { + LLControlVariable* control = combo_box->findControl(control_name); + if (control != NULL) + { + combo_box->setValue( control->getValue() ); + } + else + { + llwarns << "combo_box \"" << name << "\" has control_name \"" + << control_name << "\", but control is NULL." << llendl; + } + } + return combo_box; } @@ -244,6 +259,7 @@ void LLComboBox::onCommit() mTextEntry->setValue(getSimple()); mTextEntry->setTentative(FALSE); } + setControlValue( getValue() ); LLUICtrl::onCommit(); } -- cgit v1.1