summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitgallery.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-01-16 04:49:17 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-01-17 18:12:24 +0200
commit6d8c0d0d57ba28ae00bcdbd3617e54a63507e508 (patch)
tree6b3a798fb32c2075e7e2488b8835511f51cec4bb /indra/newview/lloutfitgallery.cpp
parentdcda078b6cdc29c2ae17a6dae4dadf3d446cccf2 (diff)
#5276 Freeze when bulk editing outfits
Schedule refreshOutfit into idle loop instead of doing lots of updates at once.
Diffstat (limited to 'indra/newview/lloutfitgallery.cpp')
-rw-r--r--indra/newview/lloutfitgallery.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 8589afae06..852f2dab21 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -850,7 +850,12 @@ void LLOutfitGallery::updateAddedCategory(LLUUID cat_id)
// Start observing changes in "My Outfits" category.
mCategoriesObserver->addCategory(cat_id,
- boost::bind(&LLOutfitGallery::refreshOutfit, this, cat_id), true);
+ [this, cat_id]()
+ {
+ mPendingOutfitRefreshes.insert(cat_id);
+ startIdleLoop(cat_id);
+ },
+ true);
outfit_category->fetch();
refreshOutfit(cat_id);
@@ -901,6 +906,18 @@ void LLOutfitGallery::updateChangedCategoryName(LLViewerInventoryCategory *cat,
}
}
+bool LLOutfitGallery::updateOneOutfit()
+{
+ if (mPendingOutfitRefreshes.empty())
+ return false;
+
+ auto it = mPendingOutfitRefreshes.begin();
+ LLUUID outfit_id = *it;
+ mPendingOutfitRefreshes.erase(it);
+ refreshOutfit(outfit_id);
+ return true;
+}
+
void LLOutfitGallery::onOutfitRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)
{
if (mOutfitMenu && cat_id.notNull())