aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llcombobox.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp
index 0523a11..d5edba7 100644
--- a/linden/indra/llui/llcombobox.cpp
+++ b/linden/indra/llui/llcombobox.cpp
@@ -565,6 +565,8 @@ void LLComboBox::showList()
565 565
566 S32 min_width = getRect().getWidth(); 566 S32 min_width = getRect().getWidth();
567 S32 max_width = llmax(min_width, MAX_COMBO_WIDTH); 567 S32 max_width = llmax(min_width, MAX_COMBO_WIDTH);
568 // make sure we have up to date content width metrics
569 mList->calcColumnWidths();
568 S32 list_width = llclamp(mList->getMaxContentWidth(), min_width, max_width); 570 S32 list_width = llclamp(mList->getMaxContentWidth(), min_width, max_width);
569 571
570 if (mListPosition == BELOW) 572 if (mListPosition == BELOW)
@@ -781,8 +783,18 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask)
781 mList->highlightNthItem(mList->getItemIndex(last_selected_item)); 783 mList->highlightNthItem(mList->getItemIndex(last_selected_item));
782 } 784 }
783 result = mList->handleKeyHere(key, mask); 785 result = mList->handleKeyHere(key, mask);
786
787 // will only see return key if it is originating from line editor
788 // since the dropdown button eats the key
789 if (key == KEY_RETURN)
790 {
791 // don't show list and don't eat key input when committing
792 // free-form text entry with RETURN since user already knows
793 // what they are trying to select
794 return FALSE;
795 }
784 // if selection has changed, pop open list 796 // if selection has changed, pop open list
785 if (mList->getLastSelectedItem() != last_selected_item) 797 else if (mList->getLastSelectedItem() != last_selected_item)
786 { 798 {
787 showList(); 799 showList();
788 } 800 }