From ac5c62de965f3e6547cec657bb97c55ebaa40c53 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 3 Jun 2023 01:07:34 +0300 Subject: SL-19795 Fixed gallery autoscrolling --- indra/newview/llinventorygallery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index f4bd98a9f7..f791521e3e 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -1008,7 +1008,7 @@ void LLInventoryGallery::scrollToShowItem(const LLUUID& item_id) const LLRect visible_content_rect = mScrollPanel->getVisibleContentRect(); LLRect item_rect; - item->localRectToOtherView(item->getLocalRect(), &item_rect, this); + item->localRectToOtherView(item->getLocalRect(), &item_rect, mScrollPanel); LLRect overlap_rect(item_rect); overlap_rect.intersectWith(visible_content_rect); @@ -1020,7 +1020,7 @@ void LLInventoryGallery::scrollToShowItem(const LLUUID& item_id) constraint_rect.setOriginAndSize(0, 0, content_rect.getWidth(), content_rect.getHeight()); LLRect item_doc_rect; - item->localRectToOtherView(item->getLocalRect(), &item_doc_rect, this); + item->localRectToOtherView(item->getLocalRect(), &item_doc_rect, mGalleryPanel); mScrollPanel->scrollToShowRect( item_doc_rect, constraint_rect ); } -- cgit v1.2.3