summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-03-19 11:36:15 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-03-19 11:36:15 -0400
commit6639ba40d11dc269457bd2a142338749cee4b906 (patch)
tree092e464058253e48eda717983ceeed72ffaa6e7a /indra
parentb84b0e71c12bb5ae7e9a6dafa1735a99f5975645 (diff)
parent01f546baeedb9af8156a5cfdb3a6084dbcf666b9 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentwearables.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 65503d4998..ebadd8a165 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -443,6 +443,11 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B
new_wearable->setItemID(old_item_id); // should this be in LLWearable::copyDataFrom()?
setWearable(type,index,new_wearable);
+ // old_wearable may still be referred to by other inventory items. Revert
+ // unsaved changes so other inventory items aren't affected by the changes
+ // that were just saved.
+ old_wearable->revertValues();
+
LLInventoryItem* item = gInventory.getItem(old_item_id);
if (item)
{
@@ -545,6 +550,11 @@ void LLAgentWearables::saveWearableAs(const EWearableType type,
category_id,
new_name,
cb);
+
+ // old_wearable may still be referred to by other inventory items. Revert
+ // unsaved changes so other inventory items aren't affected by the changes
+ // that were just saved.
+ old_wearable->revertValues();
}
void LLAgentWearables::revertWearable(const EWearableType type, const U32 index)