From a7adfe132e241e516c37cb216a89597cedb8ac76 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 18 Aug 2009 18:46:43 +0000 Subject: DEV-38131 "Drop down boxes with text entry ignore the text in the entry field" reviewed by James --- indra/llui/llcombobox.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra/llui/llcombobox.cpp') diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 93d2b83c9f..b3c3a2e698 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -614,17 +614,20 @@ void LLComboBox::showList() void LLComboBox::hideList() { - // assert selection in list - mList->selectNthItem(mLastSelectedIndex); + if (mList->getVisible()) + { + // assert selection in list + mList->selectNthItem(mLastSelectedIndex); - mButton->setToggleState(FALSE); - mList->setVisible(FALSE); - mList->mouseOverHighlightNthItem(-1); + mButton->setToggleState(FALSE); + mList->setVisible(FALSE); + mList->mouseOverHighlightNthItem(-1); - setUseBoundingRect(FALSE); - if( gFocusMgr.getTopCtrl() == this ) - { - gFocusMgr.setTopCtrl(NULL); + setUseBoundingRect(FALSE); + if( gFocusMgr.getTopCtrl() == this ) + { + gFocusMgr.setTopCtrl(NULL); + } } } -- cgit v1.2.3