summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
authorEli Linden <eli@lindenlab.com>2010-03-18 10:57:42 -0700
committerEli Linden <eli@lindenlab.com>2010-03-18 10:57:42 -0700
commit4abc086930b024888f088cfbbcaf841bf6a531dd (patch)
treeb383079fb7ddb6450ef1fd9b9f6df97240550304 /indra/newview/llagentwearables.cpp
parent766a67249f74f87f0fb2e9370883eec2093c5ba0 (diff)
parent1900b5f4100a94cf89181a077102f248f9dc80fe (diff)
Merge
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r--indra/newview/llagentwearables.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index ea10917901..65503d4998 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1702,6 +1702,16 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
LLWearable* old_wearable = getWearable(type, 0);
if (old_wearable)
{
+ // Special case where you're putting on a wearable that has the same assetID
+ // as the previous (e.g. wear a shirt then wear a copy of that shirt) since in this
+ // case old_wearable == new_wearable.
+ if (old_wearable == new_wearable)
+ {
+ old_wearable->setLabelUpdated();
+ new_wearable->setName(new_item->getName());
+ new_wearable->setItemID(new_item->getUUID());
+ }
+
const LLUUID& old_item_id = getWearableItemID(type, 0);
if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
(old_item_id == new_item->getUUID()))
@@ -1717,7 +1727,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
continue;
}
}
-
+
new_wearable->setItemID(new_item->getUUID());
setWearable(type,0,new_wearable);
}