summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llappearancemgr.cpp14
-rwxr-xr-xindra/newview/llinventorybridge.cpp22
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml8
3 files changed, 30 insertions, 14 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 61b8071cf9..8e5b0516fb 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1716,13 +1716,6 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
LLInventoryModel::EXCLUDE_TRASH,
not_worn);
- U32 max_items = gSavedSettings.getU32("WearFolderLimit");
- if (items.size() > max_items)
- {
- LL_WARNS() << "Folder contains more wearables than allowed to wear by WearFolderLimit setting" << LL_ENDL;
- return false;
- }
-
return items.size() > 0;
}
@@ -1750,13 +1743,6 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
LLInventoryModel::EXCLUDE_TRASH,
is_worn);
- U32 max_items = gSavedSettings.getU32("WearFolderLimit");
- if (items.size() > max_items)
- {
- LL_WARNS() << "Folder contains more wearables than allowed to wear by WearFolderLimit setting" << LL_ENDL;
- return false;
- }
-
return items.size() > 0;
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 3b9d5e0c3d..e0fbb655a9 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3754,6 +3754,28 @@ void LLFolderBridge::modifyOutfit(BOOL append)
LLViewerInventoryCategory* cat = getCategory();
if(!cat) return;
+ // 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;
+ }
+ }
+
LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append );
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 0607576fe6..1bc533f701 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5376,6 +5376,14 @@ Do you want to replace it with the selected object?
</notification>
<notification
+ icon="alertmodal.tga"
+ name="TooManyWearables"
+ type="alertmodal">
+ You can't wear a folder containing more than [AMOUNT] items. You can change this limit in Advanced > Show Debug Settings > WearFolderLimit.
+ <tag>fail</tag>
+ </notification>
+
+ <notification
icon="alert.tga"
label="Do Not Disturb Mode Warning"
name="DoNotDisturbModePay"