summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2025-10-20 10:25:50 -0700
committerCallum Prentice <callum@lindenlab.com>2025-10-20 10:25:50 -0700
commitc64c16a59ae2220b29ba0ed1f3f22da07e694612 (patch)
tree715e1ce1c6049469cffc27bcb0c8b636433539e5 /indra/llui/llfolderviewitem.cpp
parent53d83104522fc683126ba764b3e2101dc7442547 (diff)
parent03690724188cb3fef1c2efed0f5626c93096ec2d (diff)
Merge branch 'develop' of https://github.com/secondlife/viewer into callum/voice-moderation-2
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r--indra/llui/llfolderviewitem.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 0f9fd35868..878f1cb856 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1884,10 +1884,18 @@ void LLFolderViewFolder::updateHasFavorites(bool new_childs_value)
void LLFolderViewFolder::onIdleUpdateFavorites(void* data)
{
LLFolderViewFolder* self = reinterpret_cast<LLFolderViewFolder*>(data);
+ if (self->mFavoritesDirtyFlags == FAVORITE_CLEANUP)
+ {
+ // parent or child already processed the update, clean the callback
+ self->mFavoritesDirtyFlags = 0;
+ gIdleCallbacks.deleteFunction(&LLFolderViewFolder::onIdleUpdateFavorites, data);
+ return;
+ }
+
if (self->mFavoritesDirtyFlags == 0)
{
- // already processed either on previous run or by a different callback
- gIdleCallbacks.deleteFunction(&LLFolderViewFolder::onIdleUpdateFavorites, self);
+ llassert(false); // should not happen, everything that sets to 0 should clean callback
+ gIdleCallbacks.deleteFunction(&LLFolderViewFolder::onIdleUpdateFavorites, data);
return;
}
@@ -1915,7 +1923,7 @@ void LLFolderViewFolder::onIdleUpdateFavorites(void* data)
// Parent will remove onIdleUpdateFavorites later, don't remove now,
// We are inside gIdleCallbacks. Removing 'self' callback is safe,
// but removing 'parent' can invalidate following iterator
- parent->mFavoritesDirtyFlags = 0;
+ parent->mFavoritesDirtyFlags = FAVORITE_CLEANUP;
}
parent = parent->getParentFolder();
}
@@ -1981,7 +1989,7 @@ void LLFolderViewFolder::onIdleUpdateFavorites(void* data)
// Parent will remove onIdleUpdateFavorites later, don't remove now,
// We are inside gIdleCallbacks. Removing 'self' callback is safe,
// but removing 'parent' can invalidate following iterator
- parent->mFavoritesDirtyFlags = 0;
+ parent->mFavoritesDirtyFlags = FAVORITE_CLEANUP;
}
parent = parent->getParentFolder();
}
@@ -1992,7 +2000,7 @@ void LLFolderViewFolder::onIdleUpdateFavorites(void* data)
// Parent will remove onIdleUpdateFavorites later, don't remove now.
// We are inside gIdleCallbacks. Removing 'self' callback is safe,
// but removing 'parent' can invalidate following iterator
- parent->mFavoritesDirtyFlags = 0;
+ parent->mFavoritesDirtyFlags = FAVORITE_CLEANUP;
}
parent = parent->getParentFolder();
}