summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2019-02-26 11:21:07 +0200
committermaxim_productengine <mnikolenko@productengine.com>2019-02-26 11:21:07 +0200
commita985e54f03ed05e1b8920da695c4533870dd3463 (patch)
tree86bf1a1716da0182091de1f678e01d821c145629 /indra/newview
parent7953162907ed35d57e79b2b71c2093ae1f758c98 (diff)
SL-10615 FIXED Main menus drop-down lists can't be opened while searching its title
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llsearchableui.cpp17
-rw-r--r--indra/newview/llsearchableui.h2
2 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/llsearchableui.cpp b/indra/newview/llsearchableui.cpp
index cfe93a777e..93143eb33f 100644
--- a/indra/newview/llsearchableui.cpp
+++ b/indra/newview/llsearchableui.cpp
@@ -125,17 +125,13 @@ void ll::statusbar::SearchableItem::setNotHighlighted( )
}
}
-bool ll::statusbar::SearchableItem::hightlightAndHide( LLWString const &aFilter )
+bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter, bool hide)
{
if ((mMenu && !mMenu->getVisible() && !mWasHiddenBySearch) || dynamic_cast<LLMenuItemTearOffGL*>(mMenu))
return false;
setNotHighlighted( );
- bool bVisible(false);
- for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr )
- bVisible |= (*itr)->hightlightAndHide( aFilter );
-
if( aFilter.empty() )
{
if( mCtrl )
@@ -143,17 +139,22 @@ bool ll::statusbar::SearchableItem::hightlightAndHide( LLWString const &aFilter
return true;
}
+ bool bHighlighted(!hide);
if( mLabel.find( aFilter ) != LLWString::npos )
{
if( mCtrl )
mCtrl->setHighlighted( true );
- return true;
+ bHighlighted = true;
}
- if( mCtrl && !bVisible )
+ bool bVisible(false);
+ for (tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr)
+ bVisible |= (*itr)->hightlightAndHide(aFilter, !bHighlighted);
+
+ if (mCtrl && !bVisible && !bHighlighted)
{
mWasHiddenBySearch = true;
mMenu->setVisible(FALSE);
}
- return bVisible;
+ return bVisible || bHighlighted;
}
diff --git a/indra/newview/llsearchableui.h b/indra/newview/llsearchableui.h
index 42b2866fb6..9741557e49 100644
--- a/indra/newview/llsearchableui.h
+++ b/indra/newview/llsearchableui.h
@@ -107,7 +107,7 @@ namespace ll
SearchableItem();
void setNotHighlighted( );
- bool hightlightAndHide( LLWString const &aFilter );
+ bool hightlightAndHide( LLWString const &aFilter, bool hide = true );
};
struct SearchData