MAINT-4866 FIXED Check if subcategories (not only main category) have items which is currently worn.

meow-7.2.2
Mnikolenko ProductEngine 2015-02-18 13:07:49 +02:00
parent 3ab22ef6be
commit f00e3f41ab
1 changed files with 8 additions and 2 deletions

View File

@ -1730,9 +1730,15 @@ bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id)
{
return false;
}
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false);
return gInventory.hasMatchingDirectDescendent(outfit_cat_id, is_worn);
gInventory.collectDescendentsIf(outfit_cat_id,
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
is_worn);
return items.size() > 0;
}
// static