summaryrefslogtreecommitdiff
path: root/indra/newview/llsearchcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsearchcombobox.cpp')
-rw-r--r--indra/newview/llsearchcombobox.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp
index 29d31e8b56..ab5536a12d 100644
--- a/indra/newview/llsearchcombobox.cpp
+++ b/indra/newview/llsearchcombobox.cpp
@@ -153,16 +153,16 @@ void LLSearchComboBox::onSelectionCommit()
std::string search_query = getSimple();
LLStringUtil::trim(search_query);
- mTextEntry->setText(search_query);
- setControlValue(search_query);
-
+ // Order of add() and mTextEntry->setText does matter because add() will select first item
+ // in drop down list and its label will be copied to text box rewriting mTextEntry->setText() call
if(!search_query.empty())
{
remove(search_query);
add(search_query, ADD_TOP);
}
- LLUICtrl::onCommit();
+ mTextEntry->setText(search_query);
+ setControlValue(search_query);
}
BOOL LLSearchComboBox::remove(const std::string& name)