SL-19686 Don't reshape excessively

meow-7.2.2
Andrey Kleshchev 2023-06-16 00:15:57 +03:00
parent 44e746c206
commit e998780831
2 changed files with 7 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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();