summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallerymenu.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-05-28 21:38:00 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-05-28 21:38:00 +0300
commitb08ba3fa7bc9e6309891e510fbfb5c4e2b5c922e (patch)
tree3e5294e3b8ff07778e6134ed9dd41458386032ac /indra/newview/llinventorygallerymenu.cpp
parentb9ab6c3644da02bed6941dc8df433fb1c626f8c7 (diff)
parentde8275b14b30bf754cdba1da867cb2e6c2783639 (diff)
Merge branch 'main' into marchcat/2505-merge
# Conflicts: # .github/workflows/qatest.yaml # indra/llcommon/llsdutil.h # indra/llui/llflatlistview.h # indra/newview/llinventorybridge.cpp # indra/newview/lloutfitgallery.cpp # indra/newview/lloutfitgallery.h
Diffstat (limited to 'indra/newview/llinventorygallerymenu.cpp')
-rw-r--r--indra/newview/llinventorygallerymenu.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 71c173db16..7212c4dedb 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -585,7 +585,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));
@@ -724,7 +726,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))
@@ -769,9 +771,20 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
items.push_back(std::string("upload_def"));
}
- 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"));
+ }
}
if (!is_trash && !is_in_trash && gInventory.getRootFolderID() != selected_id)
@@ -787,9 +800,9 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
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"));
}