summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
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);
}