summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-05-17 23:57:11 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-05-17 23:57:11 +0300
commit53ed0ec70ce5c774c57c9783050c7e1b35885eec (patch)
tree62015d4736d86dc1cebc378ff59c33b1e01f42bc /indra/llui
parent784436a5b89062df69251c9ac28904f06a018011 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
Merge branch 'main' into DRTVWR-567
# Conflicts: # doc/contributions.txt
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfolderview.cpp30
-rw-r--r--indra/llui/llfolderviewitem.h1
2 files changed, 22 insertions, 9 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 14985c6bad..9fa8a84fa4 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -1694,7 +1694,8 @@ void LLFolderView::update()
// Clear the modified setting on the filter only if the filter finished after running the filter process
// Note: if the filter count has timed out, that means the filter halted before completing the entire set of items
- if (filter_object.isModified() && (!filter_object.isTimedOut()))
+ bool filter_modified = filter_object.isModified();
+ if (filter_modified && (!filter_object.isTimedOut()))
{
filter_object.clearModified();
}
@@ -1728,7 +1729,7 @@ void LLFolderView::update()
BOOL filter_finished = mViewModel->contentsReady()
&& (getViewModelItem()->passedFilter()
|| ( getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration()
- && !filter_object.isModified()));
+ && !filter_modified));
if (filter_finished
|| gFocusMgr.childHasKeyboardFocus(mParentPanel.get())
|| gFocusMgr.childHasMouseCapture(mParentPanel.get()))
@@ -1816,13 +1817,26 @@ void LLFolderView::update()
if (mSelectedItems.size() && mNeedsScroll)
{
- scrollToShowItem(mSelectedItems.back(), constraint_rect);
+ LLFolderViewItem* scroll_to_item = mSelectedItems.back();
+ scrollToShowItem(scroll_to_item, constraint_rect);
// continue scrolling until animated layout change is done
- if (filter_finished
- && (!needsArrange() || !is_visible))
- {
- mNeedsScroll = FALSE;
- }
+ bool selected_filter_finished = getRoot()->getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration();
+ if (selected_filter_finished && scroll_to_item && scroll_to_item->getViewModelItem())
+ {
+ selected_filter_finished = scroll_to_item->getViewModelItem()->getLastFilterGeneration() >= filter_object.getFirstSuccessGeneration();
+ }
+ if (filter_finished && selected_filter_finished)
+ {
+ bool needs_arrange = needsArrange() || getRoot()->needsArrange();
+ if (mParentFolder)
+ {
+ needs_arrange |= (bool)mParentFolder->needsArrange();
+ }
+ if (!needs_arrange || !is_visible)
+ {
+ mNeedsScroll = FALSE;
+ }
+ }
}
if (mSignalSelectCallback)
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index 232780ccae..c8d44de474 100644
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -341,7 +341,6 @@ protected:
F32 mAutoOpenCountdown;
S32 mLastArrangeGeneration;
S32 mLastCalculatedWidth;
- bool mNeedsSort;
bool mIsFolderComplete; // indicates that some children were not loaded/added yet
bool mAreChildrenInited; // indicates that no children were initialized