diff options
Diffstat (limited to 'indra/newview/llinventorygallerymenu.cpp')
| -rw-r--r-- | indra/newview/llinventorygallerymenu.cpp | 15 | 
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()))                  {  | 
