summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-09 23:51:11 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-16 15:16:13 +0300
commit738cf84c340d8ade3ab462340d1444c4e70ef9f5 (patch)
tree07bb35f01c09d0598f57261f8a976fb7559e244b /indra/newview/llinventoryfunctions.cpp
parent50b93bd83af7cc4ddbd5b8b68f20099dac5f5ed2 (diff)
viewer#1424 Favorite support for items in outfits
For now marking originals, pointless to marks links in COF, needs a revision due to inconsistency with inventory
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 123d47b474..3e19bf885d 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -2427,6 +2427,19 @@ void toggle_favorite(const LLUUID& obj_id)
}
}
+void toggle_linked_favorite(const LLUUID& obj_id)
+{
+ LLViewerInventoryItem* item = gInventory.getItem(obj_id);
+ if (!item)
+ {
+ LL_WARNS() << "Invalid item" << LL_ENDL;
+ return;
+ }
+
+ LLUUID linked_id = item->getLinkedUUID();
+ toggle_favorite(linked_id);
+}
+
std::string get_searchable_description(LLInventoryModel* model, const LLUUID& item_id)
{
if (model)