From 9ed99176f7315e3dde37422e6edb31732f9815da Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 19 May 2015 06:53:06 -0400 Subject: [PATCH] Fix combo boxes with control_names not starting with the right value. TODO: Fix the existing workarounds all everywhere... mostly in prefs. --- indra/llui/llcombobox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 61eb8cae8..60032acf3 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -197,9 +197,10 @@ 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 we haven't already gotten a value from our control_name and // if providing user text entry or descriptive label // don't select an item under the hood - if (!combo_box->acceptsTextInput() && combo_box->mLabel.empty()) + if (combo_box->getControlName().empty() && !combo_box->acceptsTextInput() && combo_box->mLabel.empty()) { combo_box->selectFirstItem(); }