summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallerymenu.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-22 20:51:58 +0300
committerGitHub <noreply@github.com>2024-05-22 20:51:58 +0300
commit6cc7dd09d5e69cf57e6de7fb568a0ad2693f9c9a (patch)
treefab23811a5cedc1ebf01479c852ee92ff62b636c /indra/newview/llinventorygallerymenu.cpp
parentef8f4819822288e044ea719feb6af7a1f4df4c4e (diff)
parent7bb5afc11ee5a6af78302a8d76a9a619e2baaab2 (diff)
Merge pull request #1545 from Ansariel/DRTVWR-600-maint-A
Merge main into DRTVWR-600-maint-a
Diffstat (limited to 'indra/newview/llinventorygallerymenu.cpp')
-rw-r--r--indra/newview/llinventorygallerymenu.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 50a544db88..f9fb47c5c1 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -716,7 +716,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
}
items.push_back(std::string("Purge Item"));
- if (is_folder && !get_is_category_removable(&gInventory, selected_id))
+ if (is_folder && !get_is_category_and_children_removable(&gInventory, selected_id, true))
{
disabled_items.push_back(std::string("Purge Item"));
}
@@ -782,11 +782,16 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
}
items.push_back(std::string("Cut"));
items.push_back(std::string("Delete"));
- if(!get_is_category_removable(&gInventory, selected_id))
+
+ if(!get_is_category_and_children_removable(&gInventory, selected_id, false))
{
disabled_items.push_back(std::string("Delete"));
disabled_items.push_back(std::string("Cut"));
}
+ else if (!get_is_category_and_children_removable(&gInventory, selected_id, true))
+ {
+ disabled_items.push_back(std::string("Cut"));
+ }
if(!is_inbox)
{
@@ -817,11 +822,15 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
{
items.push_back(std::string("Delete"));
}
- if(!get_is_item_removable(&gInventory, selected_id))
+ if (!get_is_item_removable(&gInventory, selected_id, false))
{
disabled_items.push_back(std::string("Delete"));
disabled_items.push_back(std::string("Cut"));
}
+ else if(!get_is_item_removable(&gInventory, selected_id, true))
+ {
+ disabled_items.push_back(std::string("Cut"));
+ }
if (selected_item && (selected_item->getInventoryType() != LLInventoryType::IT_CALLINGCARD) && !is_inbox && selected_item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
{