summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-08-11 15:36:42 +0300
committerandreykproductengine <akleshchev@productengine.com>2014-08-11 15:36:42 +0300
commitc9d24fefc0794bc8828db1deb97aac2308cab067 (patch)
tree8c4ffe9f3106cdc6882286b9d54a835745af0eca /indra/newview/llinventorybridge.cpp
parent3aa0359b2f11c6b9183cd09ba7cd2ce542a536eb (diff)
MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to
Nested folders fix
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-xindra/newview/llinventorybridge.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 33e557cddd..8e6ac20eaa 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3779,24 +3779,21 @@ void LLFolderBridge::modifyOutfit(BOOL append)
// checking amount of items to wear
U32 max_items = gSavedSettings.getU32("WearFolderLimit");
- if (cat->getDescendentCount() > max_items)
- {
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
- gInventory.collectDescendentsIf(cat->getUUID(),
- cats,
- items,
- LLInventoryModel::EXCLUDE_TRASH,
- not_worn);
-
- if (items.size() > max_items)
- {
- LLSD args;
- args["AMOUNT"] = llformat("%d", max_items);
- LLNotificationsUtil::add("TooManyWearables", args);
- return;
- }
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+ gInventory.collectDescendentsIf(cat->getUUID(),
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ not_worn);
+
+ if (items.size() > max_items)
+ {
+ LLSD args;
+ args["AMOUNT"] = llformat("%d", max_items);
+ LLNotificationsUtil::add("TooManyWearables", args);
+ return;
}
LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append );