summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-05-29 12:14:38 +0800
committerErik Kundiman <erik@megapahit.org>2025-05-29 12:14:38 +0800
commit6641e36082f27faa282a0af6f88f381ffc97e179 (patch)
tree3c316421d1ad30c9061094bf7dd814522b28bc1c /indra/newview/llinventorypanel.cpp
parent481b6bb4c4dfd57a509bd73e51ca57338ad4d860 (diff)
parentb9ab6c3644da02bed6941dc8df433fb1c626f8c7 (diff)
Merge tag 'Second_Life_Project#b9ab6c36-2025.05' into 2025.05
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 1f6da85d22..ffac62aae8 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -779,7 +779,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
{
LL_PROFILE_ZONE_SCOPED;
- if (mViewsInitialized != VIEWS_INITIALIZED) return;
+ if (mViewsInitialized != VIEWS_INITIALIZED) return; // todo: Store changes if building?
const LLInventoryModel* model = getModel();
if (!model) return;
@@ -942,6 +942,11 @@ void LLInventoryPanel::idle(void* user_data)
panel->mViewsInitialized = VIEWS_INITIALIZED;
}
}
+ // in case panel is empty or only has 'roots'
+ else if (panel->mViewsInitialized == VIEWS_BUILDING)
+ {
+ panel->mViewsInitialized = VIEWS_INITIALIZED;
+ }
// Take into account the fact that the root folder might be invalidated
if (panel->mFolderRoot.get())
@@ -2436,7 +2441,8 @@ bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLIn
void LLInventoryFavoritesItemsPanel::itemChanged(const LLUUID& id, U32 mask, const LLInventoryObject* model_item)
{
- if (!model_item && !getItemByID(id))
+ LLFolderViewItem* view_item = getItemByID(id);
+ if (!model_item && !view_item)
{
// remove operation, but item is not in panel already
return;
@@ -2452,7 +2458,6 @@ void LLInventoryFavoritesItemsPanel::itemChanged(const LLUUID& id, U32 mask, con
// specifically exlude links and not get_is_favorite(model_item)
if (model_item && model_item->getIsFavorite())
{
- LLFolderViewItem* view_item = getItemByID(id);
if (!view_item)
{
const LLViewerInventoryCategory* cat = dynamic_cast<const LLViewerInventoryCategory*>(model_item);
@@ -2516,7 +2521,8 @@ void LLInventoryFavoritesItemsPanel::itemChanged(const LLUUID& id, U32 mask, con
}
}
- if (!handled)
+ if (!handled
+ && (!model_item || model_item->getParentUUID().notNull())) // filter out 'My inventory'
{
LLInventoryPanel::itemChanged(id, mask, model_item);
}