diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-22 10:42:18 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-05-22 10:42:18 -0700 |
commit | b273edd1253e088ea864d399342a0cba2fd0aaa9 (patch) | |
tree | 317ff7c05eacccb80b3fe06d65d8f64d7ff6019d /indra/llui | |
parent | da72081582c3fd376e228cf0fceaef2ecb1948a9 (diff) | |
parent | c6fc951f34c665d0f1cd6dcff1bea114fb0ff1a0 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderview.cpp | 30 | ||||
-rw-r--r-- | indra/llui/llfolderviewitem.h | 1 | ||||
-rw-r--r-- | indra/llui/llnotifications.cpp | 2 |
3 files changed, 23 insertions, 10 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index e1869e8125..62c311f522 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1672,7 +1672,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(); } @@ -1706,7 +1707,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())) @@ -1794,13 +1795,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 ee20d048fd..a5157266c5 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -335,7 +335,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 diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7c381161c9..d736aa6634 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -337,7 +337,7 @@ void LLNotificationForm::addElement(const std::string& type, const std::string& element["name"] = name; element["text"] = name; element["value"] = value; - element["index"] = mFormData.size(); + element["index"] = LLSD::Integer(mFormData.size()); element["enabled"] = enabled; mFormData.append(element); } |