From b1fa03e224f90a2369de27c89597ad0b2a63eb6f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 9 Jan 2025 21:26:01 +0200 Subject: #3374 LLFolderViewFolder::updateHasFavorites --- indra/newview/llinventorypanel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') 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 -- cgit v1.2.3