diff options
Diffstat (limited to 'indra/llui/llcombobox.cpp')
-rw-r--r-- | indra/llui/llcombobox.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 6f9893b07a..89d8842393 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -231,6 +231,10 @@ void LLComboBox::resetDirty() } } +bool LLComboBox::itemExists(const std::string& name) +{ + return mList->getItemByLabel(name); +} // add item "name" to menu LLScrollListItem* LLComboBox::add(const std::string& name, EAddPosition pos, BOOL enabled) @@ -521,15 +525,12 @@ void LLComboBox::createLineEditor(const LLComboBox::Params& p) else { mButton->setRect(rect); - mButton->setTabStop(TRUE); - mButton->setHAlign(LLFontGL::LEFT); mButton->setLabel(mLabel.getString()); if (mTextEntry) { mTextEntry->setVisible(FALSE); } - mButton->setFollowsAll(); } } @@ -787,8 +788,10 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask) return FALSE; } // if selection has changed, pop open list - else if (mList->getLastSelectedItem() != last_selected_item || - (key == KEY_DOWN || key == KEY_UP) && !mList->isEmpty()) + else if (mList->getLastSelectedItem() != last_selected_item + || ((key == KEY_DOWN || key == KEY_UP) + && mList->getCanSelect() + && !mList->isEmpty())) { showList(); } |