From 738cf84c340d8ade3ab462340d1444c4e70ef9f5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 9 May 2024 23:51:11 +0300 Subject: 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 --- indra/newview/llinventoryfunctions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llinventoryfunctions.cpp') 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) -- cgit v1.2.3