summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-10-14 12:14:51 +0300
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-10-17 21:26:39 +0300
commit813b0e7675f0f9fb682831bdf60319f8b584b882 (patch)
treed5836a085555f1a3ed4a02726533bb9e55190d0e /indra/newview/llinventoryfunctions.cpp
parenta62f5bfac1e55455c67e1c36eb388af99795dab6 (diff)
SL-20232 Allow deletion of worn items #2
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 109dffae6b..5e702ef755 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -3024,7 +3024,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
bool marketplacelistings_item = false;
- bool worn_item = false;
+ bool has_worn = false;
bool needs_replacement = false;
LLAllDescendentsPassedFilter f;
for (std::set<LLFolderViewItem*>::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it)
@@ -3041,7 +3041,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
}
if (get_is_item_worn(viewModel->getUUID()))
{
- worn_item = true;
+ has_worn = true;
LLWearableType::EType type = viewModel->getWearableType();
if (type == LLWearableType::WT_SHAPE
|| type == LLWearableType::WT_SKIN
@@ -3058,7 +3058,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
{
LLNotificationsUtil::add("CantDeleteRequiredClothing");
}
- else if (worn_item)
+ else if (has_worn)
{
LLSD payload;
payload["has_worn"] = true;
@@ -3411,6 +3411,7 @@ void LLInventoryAction::onItemsRemovalConfirmation(const LLSD& notification, con
}
}
}
+ // TODO: collect worn items from content and folders that neede to be deleted after that
// removeSelectedItems will check if items are worn before deletion,
// don't 'unwear' yet to prevent a race condition from unwearing