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.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 21c6c98876..c38cd4d090 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -350,6 +350,10 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder)
{
mFolders.insert(mFolders.begin(), folder);
}
+ if (folder->numSelected())
+ {
+ recursiveIncrementNumDescendantsSelected(folder->numSelected());
+ }
folder->setShowLoadStatus(true);
folder->setOrigin(0, 0);
folder->reshape(getRect().getWidth(), 0);
@@ -692,29 +696,24 @@ BOOL LLFolderView::changeSelection(LLFolderViewItem* selection, BOOL selected)
return rv;
}
-S32 LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items)
+void LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items)
{
- S32 rv = 0;
-
// now store resulting selection
if (mAllowMultiSelect)
{
LLFolderViewItem *cur_selection = getCurSelectedItem();
- rv = LLFolderViewFolder::extendSelection(selection, cur_selection, items);
+ LLFolderViewFolder::extendSelection(selection, cur_selection, items);
for (S32 i = 0; i < items.count(); i++)
{
addToSelectionList(items[i]);
- rv++;
}
}
else
{
setSelection(selection, FALSE, FALSE);
- rv++;
}
mSignalSelectCallback = SIGNAL_KEYBOARD_FOCUS;
- return rv;
}
void LLFolderView::sanitizeSelection()
@@ -1972,7 +1971,11 @@ void LLFolderView::scrollToShowSelection()
{
// If items are filtered while background fetch is in progress
// scrollbar resets to the first filtered item. See EXT-3981.
- if (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && mSelectedItems.size())
+ // However we allow scrolling for folder views with mAutoSelectOverride
+ // (used in Places SP) as an exception because the selection in them
+ // is not reset during items filtering. See STORM-133.
+ if ( (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mAutoSelectOverride)
+ && mSelectedItems.size() )
{
mNeedsScroll = TRUE;
}