summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llappearancemgr.cpp16
-rwxr-xr-xindra/newview/llinventorybridge.cpp4
3 files changed, 31 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c2555efbb5..f2f457f575 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -15154,6 +15154,17 @@
<key>Value</key>
<string />
</map>
+ <key>WearFolderLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>Limits number of items in the folder that can be replaced/added to current outfit</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>U32</string>
+ <key>Value</key>
+ <integer>125</integer>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index b7fe96727f..c76652c650 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1621,6 +1621,14 @@ bool LLAppearanceMgr::getCanAddToCOF(const LLUUID& outfit_cat_id)
items,
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;
}
@@ -1647,6 +1655,14 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
items,
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 feb7a0e904..fbaee68cf8 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3639,6 +3639,10 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
{
disabled_items.push_back(std::string("Replace Outfit"));
}
+ if (!LLAppearanceMgr::getCanAddToCOF(mUUID))
+ {
+ disabled_items.push_back(std::string("Add To Outfit"));
+ }
items.push_back(std::string("Outfit Separator"));
}
}