diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 02ca331bffaeaa50b54f6e88bb1438354f43365a..a12c4f7f762bdf77b327215fc75c1e2ae378a1b3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4504,7 +4504,7 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t& return; } - if (!isItemRemovable()) + if (!isItemRemovable(false)) { disabled_items.push_back(std::string("Delete")); } diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 849f6417580bae08b920d8f2597f86c1365b6e40..c2cbf4b8ac238cae55c6dbf46b6b098e4d74cd48 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -3441,7 +3441,8 @@ void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, con // removeSelectedItems will change selection, collect worn items beforehand uuid_vec_t worn; - uuid_vec_t deletion_list; + uuid_vec_t item_deletion_list; + uuid_vec_t cat_deletion_list; if (has_worn) { //Get selected items @@ -3473,14 +3474,14 @@ void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, con } if (cat_has_worn) { - deletion_list.push_back(obj_id); + cat_deletion_list.push_back(obj_id); } } LLViewerInventoryItem* item = gInventory.getItem(obj_id); if (item && get_is_item_worn(item)) { worn.push_back(obj_id); - deletion_list.push_back(obj_id); + item_deletion_list.push_back(obj_id); } } } @@ -3495,12 +3496,16 @@ void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, con { // should fire once after every item gets detached LLAppearanceMgr::instance().removeItemsFromAvatar(worn, - [deletion_list]() + [item_deletion_list, cat_deletion_list]() { - for (const LLUUID& id : deletion_list) + for (const LLUUID& id : item_deletion_list) { remove_inventory_item(id, NULL); } + for (const LLUUID& id : cat_deletion_list) + { + remove_inventory_category(id, NULL); + } }); } diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 058bbde8b9edf96f175299f7590393d141ae8fd2..d5fce2cda764200cd807f78b74c6fa0a72978179 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -1866,7 +1866,8 @@ void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response { bool has_worn = notification["payload"]["has_worn"].asBoolean(); uuid_vec_t worn; - uuid_vec_t deletion_list; + uuid_vec_t item_deletion_list; + uuid_vec_t cat_deletion_list; for (const LLUUID& obj_id : selected_ids) { LLViewerInventoryCategory* cat = gInventory.getCategory(obj_id); @@ -1891,7 +1892,7 @@ void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response } if (cat_has_worn) { - deletion_list.push_back(obj_id); + cat_deletion_list.push_back(obj_id); } else { @@ -1904,7 +1905,7 @@ void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response if (has_worn && get_is_item_worn(item)) { worn.push_back(item->getUUID()); - deletion_list.push_back(item->getUUID()); + item_deletion_list.push_back(item->getUUID()); } else { @@ -1917,12 +1918,16 @@ void LLInventoryGallery::onDelete(const LLSD& notification, const LLSD& response { // should fire once after every item gets detached LLAppearanceMgr::instance().removeItemsFromAvatar(worn, - [deletion_list]() + [item_deletion_list, cat_deletion_list]() { - for (const LLUUID& id : deletion_list) + for (const LLUUID& id : item_deletion_list) { remove_inventory_item(id, NULL); } + for (const LLUUID& id : cat_deletion_list) + { + remove_inventory_category(id, NULL); + } }); } }