diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 09:07:21 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 09:07:21 -0400 |
commit | 5d43bc166d011e911e0492579b2f4f8bf015b48f (patch) | |
tree | ccc4cda5c2c2c3a5689f4a33dcfda2a896f21b8c /indra/newview/llsearchableui.cpp | |
parent | a3f2cacf542e1d770698ef6c7e6ea1c0a5cd3368 (diff) | |
parent | e7eced3c87310b15ac20cc3cd470d67686104a14 (diff) |
Merge commit 'e7eced3' into release/luau-scripting: whitespace fix.
Diffstat (limited to 'indra/newview/llsearchableui.cpp')
-rw-r--r-- | indra/newview/llsearchableui.cpp | 188 |
1 files changed, 94 insertions, 94 deletions
diff --git a/indra/newview/llsearchableui.cpp b/indra/newview/llsearchableui.cpp index 620bbdfcdf..0a3cb803d2 100644 --- a/indra/newview/llsearchableui.cpp +++ b/indra/newview/llsearchableui.cpp @@ -35,31 +35,31 @@ ll::prefs::SearchableItem::~SearchableItem() void ll::prefs::SearchableItem::setNotHighlighted() { - mCtrl->setHighlighted( false ); + mCtrl->setHighlighted( false ); } bool ll::prefs::SearchableItem::hightlightAndHide( LLWString const &aFilter ) { - if( mCtrl->getHighlighted() ) - return true; - - LLView const *pView = dynamic_cast< LLView const* >( mCtrl ); - if( pView && !pView->getVisible() ) - return false; - - if( aFilter.empty() ) - { - mCtrl->setHighlighted( false ); - return true; - } - - if( mLabel.find( aFilter ) != LLWString::npos ) - { - mCtrl->setHighlighted( true ); - return true; - } - - return false; + if( mCtrl->getHighlighted() ) + return true; + + LLView const *pView = dynamic_cast< LLView const* >( mCtrl ); + if( pView && !pView->getVisible() ) + return false; + + if( aFilter.empty() ) + { + mCtrl->setHighlighted( false ); + return true; + } + + if( mLabel.find( aFilter ) != LLWString::npos ) + { + mCtrl->setHighlighted( true ); + return true; + } + + return false; } ll::prefs::PanelData::~PanelData() @@ -67,109 +67,109 @@ ll::prefs::PanelData::~PanelData() bool ll::prefs::PanelData::hightlightAndHide( LLWString const &aFilter ) { - for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) - (*itr)->setNotHighlighted(); + for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) + (*itr)->setNotHighlighted(); - for (tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr) - (*itr)->setNotHighlighted(); + for (tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr) + (*itr)->setNotHighlighted(); - if (aFilter.empty()) - { - return true; - } + if (aFilter.empty()) + { + return true; + } - bool bVisible(false); - for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) - bVisible |= (*itr)->hightlightAndHide( aFilter ); + bool bVisible(false); + for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) + bVisible |= (*itr)->hightlightAndHide( aFilter ); - for( tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr ) - bVisible |= (*itr)->hightlightAndHide( aFilter ); + for( tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr ) + bVisible |= (*itr)->hightlightAndHide( aFilter ); - return bVisible; + return bVisible; } void ll::prefs::PanelData::setNotHighlighted() { - for (tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr) - (*itr)->setNotHighlighted(); + for (tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr) + (*itr)->setNotHighlighted(); - for (tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr) - (*itr)->setNotHighlighted(); + for (tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr) + (*itr)->setNotHighlighted(); } bool ll::prefs::TabContainerData::hightlightAndHide( LLWString const &aFilter ) { - for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) - (*itr)->setNotHighlighted( ); - - bool bVisible(false); - for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) - bVisible |= (*itr)->hightlightAndHide( aFilter ); - - for( tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr ) - { - bool bPanelVisible = (*itr)->hightlightAndHide( aFilter ); - if( (*itr)->mPanel ) - mTabContainer->setTabVisibility( (*itr)->mPanel, bPanelVisible ); - bVisible |= bPanelVisible; - } - - return bVisible; + for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) + (*itr)->setNotHighlighted( ); + + bool bVisible(false); + for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) + bVisible |= (*itr)->hightlightAndHide( aFilter ); + + for( tPanelDataList::iterator itr = mChildPanel.begin(); itr != mChildPanel.end(); ++itr ) + { + bool bPanelVisible = (*itr)->hightlightAndHide( aFilter ); + if( (*itr)->mPanel ) + mTabContainer->setTabVisibility( (*itr)->mPanel, bPanelVisible ); + bVisible |= bPanelVisible; + } + + return bVisible; } ll::statusbar::SearchableItem::SearchableItem() - : mMenu(0) - , mCtrl(0) - , mWasHiddenBySearch( false ) + : mMenu(0) + , mCtrl(0) + , mWasHiddenBySearch( false ) { } void ll::statusbar::SearchableItem::setNotHighlighted( ) { - for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) - (*itr)->setNotHighlighted( ); + for( tSearchableItemList::iterator itr = mChildren.begin(); itr != mChildren.end(); ++itr ) + (*itr)->setNotHighlighted( ); - if( mCtrl ) - { - mCtrl->setHighlighted( false ); + if( mCtrl ) + { + mCtrl->setHighlighted( false ); if (mWasHiddenBySearch) { mMenu->setVisible(TRUE); mWasHiddenBySearch = false; } - } + } } bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter, bool hide) { - if ((mMenu && !mMenu->getVisible() && !mWasHiddenBySearch) || dynamic_cast<LLMenuItemTearOffGL*>(mMenu)) - return false; - - setNotHighlighted( ); - - if( aFilter.empty() ) - { - if( mCtrl ) - mCtrl->setHighlighted( false ); - return true; - } - - bool bHighlighted(!hide); - if( mLabel.find( aFilter ) != LLWString::npos ) - { - if( mCtrl ) - mCtrl->setHighlighted( true ); - bHighlighted = true; - } - - 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 || bHighlighted; + if ((mMenu && !mMenu->getVisible() && !mWasHiddenBySearch) || dynamic_cast<LLMenuItemTearOffGL*>(mMenu)) + return false; + + setNotHighlighted( ); + + if( aFilter.empty() ) + { + if( mCtrl ) + mCtrl->setHighlighted( false ); + return true; + } + + bool bHighlighted(!hide); + if( mLabel.find( aFilter ) != LLWString::npos ) + { + if( mCtrl ) + mCtrl->setHighlighted( true ); + bHighlighted = true; + } + + 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 || bHighlighted; } |