diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-04-19 21:14:33 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-04-19 21:14:33 +0800 |
commit | 9595a3dee48eb8b7f10cad02b4ebdda5f596664e (patch) | |
tree | aadbfc379b2028e1f22662d38b1094c745064ad9 /indra/newview/llinventorygallerymenu.cpp | |
parent | ad9c801edb13568657c0964ebfb74257da6d9e00 (diff) | |
parent | 9a333e65c4019540d5675e72ac57ef5ab106aab0 (diff) |
Merge tag 'Second_Life_Release#9a333e65-2025.04' into 2025.04
Diffstat (limited to 'indra/newview/llinventorygallerymenu.cpp')
-rw-r--r-- | indra/newview/llinventorygallerymenu.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index 0c35a7f695..3fede1a001 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -607,7 +607,9 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men bool is_trash = (selected_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH)); bool is_in_trash = gInventory.isObjectDescendentOf(selected_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH)); bool is_lost_and_found = (selected_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND)); - bool is_outfits= (selected_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS)); + const LLUUID my_outfits = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + bool is_outfits= (selected_id == my_outfits); + bool is_in_outfits = is_outfits || gInventory.isObjectDescendentOf(selected_id, my_outfits); bool is_in_favorites = gInventory.isObjectDescendentOf(selected_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)); //bool is_favorites= (selected_id == gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE)); @@ -746,7 +748,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men } else { - if (is_agent_inventory && !is_inbox && !is_cof && !is_in_favorites && !is_outfits) + if (is_agent_inventory && !is_inbox && !is_cof && !is_in_favorites && !is_outfits && !is_in_outfits) { LLViewerInventoryCategory* category = gInventory.getCategory(selected_id); if (!category || !LLFriendCardsManager::instance().isCategoryInFriendFolder(category)) @@ -792,15 +794,26 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men items.push_back(std::string("Set favorite folder")); - if(is_outfits && !isRootFolder()) + if(is_outfits) { - items.push_back(std::string("New Outfit")); + EMyOutfitsSubfolderType res = myoutfit_object_subfolder_type(&gInventory, selected_id, my_outfits); + if (res != MY_OUTFITS_OUTFIT && res != MY_OUTFITS_SUBOUTFIT) + { + items.push_back(std::string("New Outfit")); + items.push_back(std::string("New Outfit Folder")); + } + items.push_back(std::string("Delete")); + items.push_back(std::string("Rename")); + if (!get_is_category_and_children_removable(&gInventory, selected_id, false)) + { + disabled_items.push_back(std::string("Delete")); + } } items.push_back(std::string("Subfolder Separator")); - if (!is_system_folder && !isRootFolder()) + if (!is_system_folder && !isRootFolder() && !is_outfits) { - if(has_children && (folder_type != LLFolderType::FT_OUTFIT)) + if(has_children && (folder_type != LLFolderType::FT_OUTFIT) && !is_in_outfits) { items.push_back(std::string("Ungroup folder items")); } |