summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r--indra/newview/llfolderview.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index cc807c2370..f74d912842 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -186,7 +186,7 @@ LLFolderView::LLFolderView(const Params& p)
mNeedsAutoRename(FALSE),
mDebugFilters(FALSE),
mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME), // This gets overridden by a pref immediately
- mFilter( new LLInventoryFilter(p.name) ),
+ mFilter( new LLInventoryFilter(p.title) ),
mShowSelectionContext(FALSE),
mShowSingleSelection(FALSE),
mArrangeGeneration(0),
@@ -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 );
@@ -837,11 +839,14 @@ void LLFolderView::sanitizeSelection()
void LLFolderView::clearSelection()
{
- if (mSelectedItems.size() > 0)
+ for (selected_items_t::const_iterator item_it = mSelectedItems.begin();
+ item_it != mSelectedItems.end();
+ ++item_it)
{
- recursiveDeselect(FALSE);
- mSelectedItems.clear();
+ (*item_it)->setUnselected();
}
+
+ mSelectedItems.clear();
mSelectThisID.setNull();
}
@@ -1826,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();