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 d37886806b..a0cf96bb40 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -356,6 +356,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);
@@ -698,29 +702,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()
@@ -1978,7 +1977,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;
}