diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 11:19:51 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 11:19:51 +0000 |
commit | 44cfa948c7a8bf6786b204c35973ac879cdfc491 (patch) | |
tree | c34ec0cc9e0c73a72071463d71caa068d2af2659 /indra/newview/llagentwearables.cpp | |
parent | a4ef5e2b0d4e36aa98f2e4074f4ddd4cad3d3106 (diff) | |
parent | fc1af768b800c890cda8ef3e8b9ee2537ca1d92a (diff) |
merge.
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index d560331392..6620780b27 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -310,21 +310,24 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, return; LLUUID old_item_id = getWearableItemID((EWearableType)type,index); + if (wearable) { wearable->setItemID(item_id); - } - if (old_item_id.notNull()) - { - gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); - setWearable((EWearableType)type,index,wearable); - } - else - { - pushWearable((EWearableType)type,wearable); + if (old_item_id.notNull()) + { + gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); + setWearable((EWearableType)type,index,wearable); + } + else + { + pushWearable((EWearableType)type,wearable); + } } + gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); + LLViewerInventoryItem* item = gInventory.getItem(item_id); if (item && wearable) { @@ -1618,8 +1621,10 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } if (new_wearable) + { new_wearable->setItemID(new_item->getUUID()); - setWearable(type,0,new_wearable); + setWearable(type,0,new_wearable); + } } std::vector<LLWearable*> wearables_being_removed; |