summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentwearables.cpp12
-rw-r--r--indra/newview/llwearablelist.h6
2 files changed, 17 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);
}
diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h
index cf1a9bddff..5e564ba953 100644
--- a/indra/newview/llwearablelist.h
+++ b/indra/newview/llwearablelist.h
@@ -39,6 +39,12 @@
#include "llassetstorage.h"
// Globally constructed; be careful that there's no dependency with gAgent.
+/*
+ BUG: mList's system of mapping between assetIDs and wearables is flawed
+ since LLWearable* has an associated itemID, and you can have multiple
+ inventory items pointing to the same asset (i.e. more than one ItemID
+ per assetID). EXT-6252
+*/
class LLWearableList : public LLSingleton<LLWearableList>
{
public: