diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-02-18 13:07:49 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-02-18 13:07:49 +0200 |
commit | f00e3f41aba03b901c86f7a0eceff72d284c76b9 (patch) | |
tree | c228ee5f7a995875be3acb0dc0403f7109e1539c /indra/newview | |
parent | 3ab22ef6be3c83bf9f90d19a1bf27be07868eab3 (diff) |
MAINT-4866 FIXED Check if subcategories (not only main category) have items which is currently worn.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index d7ef5fcba7..c6971edf9f 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -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 |