From f00e3f41aba03b901c86f7a0eceff72d284c76b9 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 18 Feb 2015 13:07:49 +0200 Subject: MAINT-4866 FIXED Check if subcategories (not only main category) have items which is currently worn. --- indra/newview/llappearancemgr.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappearancemgr.cpp') 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 -- cgit v1.2.3 From 4d1072a0a8912748bc62d42617cc6d5679a1bf20 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 3 Apr 2015 18:36:14 +0300 Subject: MAINT-4878 FIXED Outfits worn from library copy the subfolders too --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c6971edf9f..0ac0dccc4e 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2357,7 +2357,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool LLPointer copy_cb = new LLWearCategoryAfterCopy(append); LLPointer track_cb = new LLTrackPhaseWrapper( std::string("wear_inventory_category_callback"), copy_cb); - LLPointer cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb); + LLPointer cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb, false); ais_ran=cmd_ptr->run_command(); } -- cgit v1.2.3