diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-03-15 12:51:57 +0200 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-03-15 12:51:57 +0200 |
commit | ea6af38e40358331c6740bea8db3c88346bd4c7a (patch) | |
tree | e21168d6287646c5c8387dcadc7f0ccc877d8479 | |
parent | 641757e7c1b2bae59b3901d3f0bfd33ce2166f23 (diff) |
Fixed normal bug (EXT-5834) Inventory SP: context menu for empty search result contain inappropriate items.
- Fixed folder_view and inventory_panel resizing in LLFolderView::arrange() when all visible items are filtered out. This fixed context menu for "Search" SLURL in Places->My Landmarks.
- Added check for visible items to display correct context menu when right-clicking on "Search" SLURL for empty search results in any inventory panel.
Reviewed by Leyla Farazha https://codereview.productengine.com/secondlife/r/14/
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llfolderview.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 23062bafec..0de41ee591 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -417,11 +417,6 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen S32 total_width = LEFT_PAD; S32 running_height = mDebugFilters ? llceil(LLFontGL::getFontMonospace()->getLineHeight()) : 0; S32 target_height = running_height; - if(!mHasVisibleChildren)// is there any filtered items ? - { - //Nope. We need to display status textbox, let's reserve some place for it - target_height += mStatusTextBox->getTextPixelHeight(); - } S32 parent_item_height = getRect().getHeight(); for (folders_t::iterator iter = mFolders.begin(); @@ -481,6 +476,13 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen } } + if(!mHasVisibleChildren)// is there any filtered items ? + { + //Nope. We need to display status textbox, let's reserve some place for it + running_height = mStatusTextBox->getTextPixelHeight(); + target_height = running_height; + } + LLRect scroll_rect = mScrollContainer->getContentWindowRect(); reshape( llmax(scroll_rect.getWidth(), total_width), running_height ); @@ -1829,7 +1831,9 @@ BOOL LLFolderView::handleRightMouseDown( S32 x, S32 y, MASK mask ) BOOL handled = childrenHandleRightMouseDown(x, y, mask) != NULL; S32 count = mSelectedItems.size(); LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); - if(handled && (count > 0) && menu) + if ( handled + && ( count > 0 && (hasVisibleChildren() || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS) ) // show menu only if selected items are visible + && menu ) { if (mCallbackRegistrar) mCallbackRegistrar->pushScope(); |