summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-03-18 19:24:58 +0200
committerandreykproductengine <akleshchev@productengine.com>2015-03-18 19:24:58 +0200
commit3805808cafd1a78436f1906f5e554855fd3cb3f7 (patch)
treebf466662cb7073f64e9663076aba126d989388e3 /indra/newview
parentf30b54b64fcb6667571bf2340b396fb700ff6965 (diff)
MAINT-4872 FIXED Display name for shapes was not updated in certain cases
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llagentwearables.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 010a39a6e7..f6ba879fa7 100755
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1011,7 +1011,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
// Update only inventory in this case - ordering of wearables with the same asset id has no effect.
- // Causes the two-alphas error case in MAINT-4158.
+ // Updating wearables in this case causes the two-alphas error in MAINT-4158.
// We should actually disallow wearing two wearables with the same asset id.
if (curr_wearable->getName() != new_item->getName() ||
curr_wearable->getItemID() != new_item->getUUID())
@@ -1065,7 +1065,8 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
if (new_wearable)
{
const LLWearableType::EType type = new_wearable->getType();
-
+
+ LLUUID old_wearable_id = new_wearable->getItemID();
new_wearable->setName(new_item->getName());
new_wearable->setItemID(new_item->getUUID());
@@ -1073,11 +1074,18 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
{
// exactly one wearable per body part
setWearable(type,0,new_wearable);
+ if (old_wearable_id.notNull())
+ {
+ // we changed id before setting wearable, update old item manually
+ // to complete the swap.
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, old_wearable_id);
+ }
}
else
{
pushWearable(type,new_wearable);
}
+
const BOOL removed = FALSE;
wearableUpdated(new_wearable, removed);
}