summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-08-12 09:53:17 -0700
committerRichard Linden <none@none>2010-08-12 09:53:17 -0700
commit402e2a181831d30a6a2586fd4b0641ba66da99be (patch)
tree335f57714bbc00510ede9e60c3d363722ef6ee43 /indra/newview/llagentwearables.cpp
parentbe50a053ed4ae7d0b15fc20f1c6ca0973c56ffd9 (diff)
parent4e8c33e7252d38d00b5606e1960aa520c75e0227 (diff)
merge
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r--indra/newview/llagentwearables.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 6ee5a8b279..337878cf96 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -388,7 +388,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);
@@ -404,12 +406,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 =
@@ -1885,10 +1885,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());