diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-08-06 16:00:03 +0300 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-08-06 16:00:03 +0300 |
commit | dc1b42e31fe2ff9f7d20fdace7f74bb451918c5d (patch) | |
tree | 688f6e193da2629b87af07cab7fda8b02dd130c1 /indra | |
parent | ac787b54682cef5d11ff13fba46024030e7b1edb (diff) |
EXT-8539 FIXED Fixed title of alpha mask not save if renaming it from 'Editing' panel.
Bug happened because name change was not explicitly listed as sufficient reason to save a wearable. So saving failed for alpha masks with only names changed.
Other wearables didn't have this problem because they passed precondition even if only name was changed thanking to checks that included visualparams.
- Made name change explicitly a sufficient reason to proceed with saving a wearable.
Reviewed by Neal Orman at https://codereview.productengine.com/secondlife/r/840/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6ee5a8b279..6e3e54df2c 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 = |