diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-08-08 07:30:46 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-08-08 07:37:27 +0800 |
commit | cfc4f075a82f9dc1156fce6994083143de6727a8 (patch) | |
tree | 2948ea5c6ebfbbc15721a2838804d6a766742887 /indra/newview/llinventorybridge.cpp | |
parent | 73fdef6693017f1160875d1f7a79875945df3929 (diff) | |
parent | 55f1c8b9797836c9816528bb5b772eb83b083b50 (diff) |
Merge tag 'Second_Life_Release#55f1c8b9-2025.06' into 2025.06
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index edefb5d109..359a009fef 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4555,6 +4555,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("Rename")); items.push_back(std::string("thumbnail")); + addInventoryFavoritesMenuOptions(items); addDeleteContextMenuOptions(items, disabled_items); // EXT-4030: disallow deletion of currently worn outfit const LLViewerInventoryItem* base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink(); @@ -4572,6 +4573,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items EMyOutfitsSubfolderType in_my_outfits = myoutfit_object_subfolder_type(model, mUUID, outfits_id); if (in_my_outfits != MY_OUTFITS_NO) { + // Either an outfit or a subfolder inside MY_OUTFITS if (in_my_outfits == MY_OUTFITS_SUBFOLDER) { // Not inside an outfit, but inside 'my outfits' @@ -4581,6 +4583,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("Rename")); items.push_back(std::string("thumbnail")); + addInventoryFavoritesMenuOptions(items); addDeleteContextMenuOptions(items, disabled_items); } else @@ -4629,14 +4632,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items if (model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT) == mUUID) { items.push_back(std::string("Copy outfit list to clipboard")); - if (isFavorite()) - { - items.push_back(std::string("Remove from Favorites")); - } - else - { - items.push_back(std::string("Add to Favorites")); - } + addInventoryFavoritesMenuOptions(items); addOpenFolderMenuOptions(flags, items); } @@ -4898,6 +4894,18 @@ void LLFolderBridge::addOpenFolderMenuOptions(U32 flags, menuentry_vec_t& items) } } +void LLFolderBridge::addInventoryFavoritesMenuOptions(menuentry_vec_t& items) +{ + if (isFavorite()) + { + items.push_back(std::string("Remove from Favorites")); + } + else + { + items.push_back(std::string("Add to Favorites")); + } +} + bool LLFolderBridge::hasChildren() const { LLInventoryModel* model = getInventoryModel(); |