summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-15 18:08:12 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-15 18:08:12 -0400
commit8a4add76b44bab32633c5432f8852e5351770c91 (patch)
tree4bd0070035d66ce03b300490435d4f0fc10d9760
parent2ed3746aee81901435f3f28f71a497d234d680d2 (diff)
SH-4175 WIP - Avoid add to outfit or remove from outfit when an outfit change is already in progress
-rwxr-xr-xindra/newview/llappearancemgr.cpp14
-rwxr-xr-xindra/newview/llinventorybridge.cpp4
-rwxr-xr-xindra/newview/llviewerinventory.cpp2
3 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 84a494186f..f48755ecce 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1547,6 +1547,11 @@ bool LLAppearanceMgr::getCanRemoveOutfit(const LLUUID& outfit_cat_id)
// static
bool LLAppearanceMgr::getCanRemoveFromCOF(const LLUUID& outfit_cat_id)
{
+ if (gAgentWearables.isCOFChangeInProgress())
+ {
+ return false;
+ }
+
LLFindWearablesEx is_worn(/*is_worn=*/ true, /*include_body_parts=*/ false);
return gInventory.hasMatchingDirectDescendent(outfit_cat_id, is_worn);
}
@@ -1578,8 +1583,8 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
}
// Check whether the outfit contains any wearables we aren't wearing already (STORM-702).
- LLFindWearablesEx is_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
- return gInventory.hasMatchingDirectDescendent(outfit_cat_id, is_worn);
+ LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
+ return gInventory.hasMatchingDirectDescendent(outfit_cat_id, not_worn);
}
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> cb)
@@ -3001,11 +3006,13 @@ protected:
<< llendl;
}
LL_INFOS("Avatar") << " ================================= " << llendl;
+ S32 local_only = 0, ais_only = 0;
for (std::set<LLUUID>::iterator it = local_items.begin(); it != local_items.end(); ++it)
{
if (ais_items.find(*it) == ais_items.end())
{
LL_INFOS("Avatar") << "LOCAL ONLY: " << *it << llendl;
+ local_only++;
}
}
for (std::set<LLUUID>::iterator it = ais_items.begin(); it != ais_items.end(); ++it)
@@ -3013,9 +3020,10 @@ protected:
if (local_items.find(*it) == local_items.end())
{
LL_INFOS("Avatar") << "AIS ONLY: " << *it << llendl;
+ ais_only++;
}
}
- if (local_items.size()==0 && ais_items.size()==0)
+ if (local_only==0 && ais_only==0)
{
LL_INFOS("Avatar") << "COF contents identical, only version numbers differ (req "
<< content["observed"].asInteger()
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index abebd0aa5e..b857f8bbec 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3579,6 +3579,10 @@ void LLFolderBridge::buildContextMenuFolderOptions(U32 flags, menuentry_vec_t&
{
disabled_items.push_back(std::string("Replace Outfit"));
}
+ if (!LLAppearanceMgr::instance().getCanAddToCOF(mUUID))
+ {
+ disabled_items.push_back(std::string("Add To Outfit"));
+ }
items.push_back(std::string("Outfit Separator"));
}
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 202ed43caa..18ea812471 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1182,8 +1182,8 @@ void remove_inventory_item(
const LLUUID& item_id,
LLPointer<LLInventoryCallback> cb)
{
- llinfos << "item_id: [" << item_id << "] " << llendl;
LLPointer<LLViewerInventoryItem> obj = gInventory.getItem(item_id);
+ llinfos << "item_id: [" << item_id << "] name " << (obj ? obj->getName() : "(NOT FOUND)") << llendl;
if(obj)
{
std::string cap;