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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index b2dd47548c..590cbbec4e 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -770,6 +770,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
// Remove the item's UI.
LLFolderViewFolder* parent = view_item->getParentFolder();
removeItemID(viewmodel_item->getUUID());
+ bool was_favorite = view_item->isFavorite();
view_item->destroyView();
if(parent)
{
@@ -783,7 +784,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
updateFolderLabel(viewmodel_folder->getUUID());
}
}
- if (view_item->isFavorite())
+ if (was_favorite)
{
parent->updateHasFavorites(false); // favorite was removed
}
@@ -2452,6 +2453,7 @@ bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLIn
{
removeItemID(viewmodel_item->getUUID());
}
+ bool was_favorite = view_item->isFavorite();
view_item->destroyView();
if (parent)
{
@@ -2461,7 +2463,7 @@ bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLIn
{
updateFolderLabel(viewmodel_folder->getUUID());
}
- if (view_item->isFavorite())
+ if (was_favorite)
{
parent->updateHasFavorites(false); // favorite was removed
}