diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-16 00:15:57 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-06-16 00:15:57 +0300 |
commit | e99878083155b81c93b0c8b05f300a4501a2d775 (patch) | |
tree | eeafb143d213cb80daa6ec5e045ea6cbe18b13eb /indra | |
parent | 44e746c2068aa983c15336277fc8f988fcb94303 (diff) |
SL-19686 Don't reshape excessively
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llinventorygallery.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llinventorygallery.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index a7dfbb5938..694881372d 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -379,7 +379,7 @@ void LLInventoryGallery::reArrangeRows(S32 row_diff) std::vector<LLInventoryGalleryItem*> buf_items = mItems; for (std::vector<LLInventoryGalleryItem*>::const_reverse_iterator it = buf_items.rbegin(); it != buf_items.rend(); ++it) { - removeFromGalleryLast(*it); + removeFromGalleryLast(*it, false); } for (std::vector<LLInventoryGalleryItem*>::const_reverse_iterator it = mHiddenItems.rbegin(); it != mHiddenItems.rend(); ++it) { @@ -492,7 +492,7 @@ void LLInventoryGallery::addToGallery(LLInventoryGalleryItem* item) } -void LLInventoryGallery::removeFromGalleryLast(LLInventoryGalleryItem* item) +void LLInventoryGallery::removeFromGalleryLast(LLInventoryGalleryItem* item, bool needs_reshape) { if(item->isHidden()) { @@ -518,7 +518,10 @@ void LLInventoryGallery::removeFromGalleryLast(LLInventoryGalleryItem* item) } removeLastRow(); } - reshapeGalleryPanel(row_count); + if (needs_reshape) + { + reshapeGalleryPanel(row_count); + } } diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index e314281a07..ce618602df 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -189,7 +189,7 @@ protected: private: void addToGallery(LLInventoryGalleryItem* item); - void removeFromGalleryLast(LLInventoryGalleryItem* item); + void removeFromGalleryLast(LLInventoryGalleryItem* item, bool needs_reshape = true); void removeFromGalleryMiddle(LLInventoryGalleryItem* item); LLPanel* addLastRow(); void removeLastRow(); |