From f3cd329b585ef55a66f2a824f010d1a54d67d8d2 Mon Sep 17 00:00:00 2001 From: akleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 10 Jan 2023 19:38:44 +0200 Subject: SL-18911 My Land Holdings floater crashes viewer on the Xcode/+Monterey branches (#47) Revert part of "DRTVWR-575: Address review comments on Xcode 14.1 type tweaks." Crash was reproduced when assigning areastr to llsd, but likely present in other cases of assigning ui strings to llsd (instead of going for lluistring's result directly copy constructor was engaged and either copy or original crashed due to invalid pointers, copy shouldn't have been created). --- indra/llui/llnotifications.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') 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); } -- cgit v1.2.3 From a1931d8cc4820eb4e20f1346fc7c3e0139c5863b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 16 Jan 2023 04:42:33 +0200 Subject: SL-18735 Using "Find original" in main inventory tab breaks inventory view Fixes folders being invidible (missing arrange) Fixes sroll to target not working reliably --- indra/llui/llfolderview.cpp | 30 ++++++++++++++++++++++-------- indra/llui/llfolderviewitem.h | 1 - 2 files changed, 22 insertions(+), 9 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index ea2ca68e47..5391222b67 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1646,7 +1646,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(); } @@ -1680,7 +1681,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())) @@ -1768,13 +1769,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 = true; + if (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(); + 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 -- cgit v1.2.3 From 375d01e17aae74f7e2d8bc21a976b11964e8ce59 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 17 Feb 2023 02:31:35 +0200 Subject: SL-18735 Fix scroll not following item for long enough --- indra/llui/llfolderview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 503a18f50d..62c311f522 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1798,14 +1798,14 @@ void LLFolderView::update() LLFolderViewItem* scroll_to_item = mSelectedItems.back(); scrollToShowItem(scroll_to_item, constraint_rect); // continue scrolling until animated layout change is done - bool selected_filter_finished = true; - if (scroll_to_item && scroll_to_item->getViewModelItem()) + 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(); + bool needs_arrange = needsArrange() || getRoot()->needsArrange(); if (mParentFolder) { needs_arrange |= (bool)mParentFolder->needsArrange(); -- cgit v1.2.3