summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorypanel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index bcdd548cb6..5528bfa66b 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -668,7 +668,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
if (get_is_favorite(model_item))
{
- LLFolderViewFolder* new_parent = (LLFolderViewFolder*)getItemByID(model_item->getParentUUID());
+ LLFolderViewFolder* new_parent = getFolderByID(model_item->getParentUUID());
if (new_parent)
{
new_parent->updateHasFavorites(true);
@@ -728,12 +728,18 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
if (view_item->isFavorite())
{
+ if (old_parent)
+ {
old_parent->updateHasFavorites(false); // favorite was removed
+ }
+ if (new_parent)
+ {
new_parent->updateHasFavorites(true); // favorite was added
}
}
}
}
+ }
//////////////////////////////
// REMOVE Operation