summaryrefslogtreecommitdiff
path: root/indra/newview/llwearable.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2009-12-01 19:21:39 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2009-12-01 19:21:39 -0500
commit5642d7d0122da91d8ef23f8adb069cc82e0c4ed4 (patch)
tree08d70da6b706304fe0e32fc0949d27504340728c /indra/newview/llwearable.cpp
parentdd6fa93d84a267c6367f83c2d7581207e6dd878d (diff)
EXT-2749 Appearance editor still uses the name for items that have been renamed.
The name stored in an LLWearable object is not always in sync with the LLInventoryItem name. Since we reference these by asset id, which does not change when you rename something (only the LLInventoryItem changes). Fixed by refreshing the name from the LLInventoryItem every time we wear the object. If we are already wearing the object, the wearable's name is already explicitly updated. Code reviewed by Bigpapi --HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llwearable.cpp')
-rw-r--r--indra/newview/llwearable.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index 3cb0ec4bad..0405b9d28b 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -1094,6 +1094,16 @@ void LLWearable::setLabelUpdated() const
gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID());
}
+void LLWearable::refreshName()
+{
+ LLUUID item_id = getItemID();
+ LLInventoryItem* item = gInventory.getItem(item_id);
+ if( item )
+ {
+ mName = item->getName();
+ }
+}
+
struct LLWearableSaveData
{
EWearableType mType;