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.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 5d8e3f9ab9..c38cd4d090 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -224,7 +224,7 @@ LLFolderView::LLFolderView(const Params& p)
params.name("ren");
params.rect(rect);
params.font(getLabelFontForStyle(LLFontGL::NORMAL));
- params.max_length_bytes(DB_INV_ITEM_NAME_STR_LEN);
+ params.max_length.bytes(DB_INV_ITEM_NAME_STR_LEN);
params.commit_callback.function(boost::bind(&LLFolderView::commitRename, this, _2));
params.prevalidate_callback(&LLTextValidate::validateASCIIPrintableNoPipe);
params.commit_on_focus_lost(true);
@@ -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;
}