diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-26 16:52:32 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-26 16:52:32 +0300 |
commit | 19fb0a16695b57e70dc371471d37c16929f1c424 (patch) | |
tree | 39f16d806b66e3795ded41c1462e205404996046 /indra/newview/llagentwearables.cpp | |
parent | 8e56f063924601041bac3791e794fa6934f20936 (diff) | |
parent | 1a8d917a6d0d2393a0f0248d0072dd7cfd487609 (diff) |
Manual merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index a1ce556458..4c2caae2c6 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -382,7 +382,9 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 const std::string new_name) { LLWearable* old_wearable = getWearable(type, index); - if (old_wearable && (old_wearable->isDirty() || old_wearable->isOldVersion())) + if(!old_wearable) return; + bool name_changed = !new_name.empty() && (new_name != old_wearable->getName()); + if (name_changed || old_wearable->isDirty() || old_wearable->isOldVersion()) { LLUUID old_item_id = old_wearable->getItemID(); LLWearable* new_wearable = LLWearableList::instance().createCopy(old_wearable); @@ -398,12 +400,10 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 if (item) { std::string item_name = item->getName(); - bool name_changed = false; - if (!new_name.empty() && (new_name != item->getName())) + if (name_changed) { llinfos << "saveWearable changing name from " << item->getName() << " to " << new_name << llendl; item_name = new_name; - name_changed = true; } // Update existing inventory item LLPointer<LLViewerInventoryItem> template_item = @@ -1750,7 +1750,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj LLViewerObject *objectp = (*attachment_iter); if (objectp) { - LLUUID object_item_id = objectp->getItemID(); + LLUUID object_item_id = objectp->getAttachmentItemID(); if (requested_item_ids.find(object_item_id) != requested_item_ids.end()) { // Object currently worn, was requested. @@ -1879,10 +1879,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra msg->nextBlockFast(_PREHASH_ObjectData ); msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); - if (gSavedSettings.getBOOL("MultipleAttachments")) - msg->addU8Fast(_PREHASH_AttachmentPt, 0 | ATTACHMENT_ADD ); - else - msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point + msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); msg->addStringFast(_PREHASH_Name, item->getName()); msg->addStringFast(_PREHASH_Description, item->getDescription()); |