Combox for reflection detail was not initializing to correct selection.

This commit is contained in:
Shyotl
2011-05-13 02:20:50 -05:00
parent 8ac9da7bc8
commit ccce2a0641
2 changed files with 4 additions and 3 deletions

View File

@@ -178,8 +178,6 @@ LLView* LLComboBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *
NULL);
combo_box->setAllowTextEntry(allow_text_entry, max_chars);
combo_box->initFromXML(node, parent);
const std::string& contents = node->getValue();
if (contents.find_first_not_of(" \n\t") != contents.npos)
@@ -210,6 +208,9 @@ LLView* LLComboBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *
}
}
//Do this AFTER combo_items are set up so setValue is actually able to select the correct initial entry.
combo_box->initFromXML(node, parent);
// if providing user text entry or descriptive label
// don't select an item under the hood
if (!combo_box->acceptsTextInput() && combo_box->mLabel.empty())