From 136029821ca37dbe7d7707a0fb0422612a31bae6 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Mon, 20 Sep 2010 17:24:33 -0700 Subject: STORM-162 : Makes the folder code more resilient --- indra/newview/llfolderview.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 5d8e3f9ab9..bbe837c507 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& items) +void LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray& 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() -- cgit v1.2.3 From 9cd8da3f9c5e17ec48523db26187cdd097ba6e3c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Tue, 21 Sep 2010 18:38:48 +0300 Subject: STORM-133 FIXED keyboard navigation in Places SP->My Landmarks while items fetch is in progress. --- indra/newview/llfolderview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 5d8e3f9ab9..bbcd3fa652 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1972,7 +1972,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; } -- cgit v1.2.3