summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2010-10-20 19:24:32 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2010-10-20 19:24:32 +0300
commit802a985882532dd3bfa5497155f0097d201e4d46 (patch)
tree62ff207e8d208645d169c6f952700b1b17f7b217 /indra/newview
parent04425000ae60b1fccf4feac1d4d84796d3b6b27d (diff)
STORM-311 FIXED "Share" button in My Inventory SP was not updated on Current Outfit changes.
When you wear an inventory item, the code that disables/enables the button was called as soon as the item got linked to COF, before it actually appeared on your avatar. However to determine whether to enable the button, the code checked avatar appearence. I fixed it to take the COF link into account, i.e. to treat items linked to COF as worn (=not shareable), no matter has appearance been updated or not.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llgiveinventory.cpp4
-rw-r--r--indra/newview/llinventoryfunctions.cpp5
2 files changed, 3 insertions, 6 deletions
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index 260e15c714..f990b9294d 100644
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -128,7 +128,7 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
switch(item->getType())
{
case LLAssetType::AT_OBJECT:
- if (gAgentAvatarp->isWearingAttachment(item->getUUID()))
+ if (get_is_item_worn(item->getUUID()))
{
acceptable = false;
}
@@ -139,7 +139,7 @@ bool LLGiveInventory::isInventoryGiveAcceptable(const LLInventoryItem* item)
BOOL copyable = false;
if (item->getPermissions().allowCopyBy(gAgentID)) copyable = true;
- if (!copyable && gAgentWearables.isWearingItem(item->getUUID()))
+ if (!copyable && get_is_item_worn(item->getUUID()))
{
acceptable = false;
}
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index f3d9639dee..ef20869114 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -487,12 +487,9 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(const LLInventoryIte
return false;
break;
case LLAssetType::AT_OBJECT:
- if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID()))
- return true;
- break;
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
- if(!gAgentWearables.isWearingItem(item->getUUID()))
+ if (!get_is_item_worn(item->getUUID()))
return true;
break;
default: