From 4fdf1c34b43f73c576576a6487c16e99e2ed75fc Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Thu, 13 Mar 2014 01:44:41 +0200 Subject: MAINT-3812 FIXED "Remove from outfit" is unavailable for folders containing only gestures --- indra/newview/llappearancemgr.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index da1609297e..415cefb5a9 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1431,6 +1431,18 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) uuids_to_remove.push_back(item->getUUID()); } removeItemsFromAvatar(uuids_to_remove); + + // now deactivating all gestures in that folder + LLInventoryModel::item_array_t gest_items; + getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false); + for (S32 i = 0; i < gest_items.count(); ++i) + { + LLViewerInventoryItem *gest_item = gest_items.get(i); + if (LLGestureMgr::instance().isGestureActive(gest_item->getLinkedUUID())) + { + LLGestureMgr::instance().deactivateGesture(gest_item->getLinkedUUID()); + } + } } // Create a copy of src_id + contents as a subfolder of dst_id. -- cgit v1.3 From fadf35b90a96475cc2af31eab08a982641a6db0e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 29 May 2014 10:57:16 +0300 Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappearancemgr.cpp | 16 ++++++++++++++++ indra/newview/llinventorybridge.cpp | 4 ++++ 3 files changed, 31 insertions(+) (limited to 'indra/newview/llappearancemgr.cpp') 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 @@ Value + WearFolderLimit + + Comment + Limits number of items in the folder that can be replaced/added to current outfit + Persist + 1 + Type + U32 + Value + 125 + 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")); } } -- cgit v1.3 From 5af3c90a9e2eac10f78008c0e7af50c85726265b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 8 Jul 2014 18:20:47 +0300 Subject: MAINT-4086 FIXED Limit the number items "Replace Current Outfit" or "Wear" applies to --- indra/newview/llappearancemgr.cpp | 14 -------------- indra/newview/llinventorybridge.cpp | 22 ++++++++++++++++++++++ .../newview/skins/default/xui/en/notifications.xml | 8 ++++++++ 3 files changed, 30 insertions(+), 14 deletions(-) (limited to 'indra/newview/llappearancemgr.cpp') 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 @@ -5375,6 +5375,14 @@ Do you want to replace it with the selected object? + + You can't wear a folder containing more than [AMOUNT] items. You can change this limit in Advanced > Show Debug Settings > WearFolderLimit. + fail + +