summaryrefslogtreecommitdiff
path: root/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-12-18 16:08:39 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2009-12-18 16:08:39 -0800
commitaa7efb7540d9eed9d8832bb65c52c3fdb1b811c8 (patch)
treed74df2438d1d62b6c2c683a12bcd42d8dee6e41b /indra/newview/llpreview.cpp
parent043407238a4162c0d20413338cf6a7088be1f674 (diff)
parent4964ca39f14531630ffbfece593f8ba9cdc86e4e (diff)
merge.
Diffstat (limited to 'indra/newview/llpreview.cpp')
-rw-r--r--indra/newview/llpreview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index c95882931b..0b0c03e9e9 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -150,6 +150,13 @@ void LLPreview::onCommit()
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setDescription(childGetText("desc"));
+
+ std::string new_name = childGetText("name");
+ if ( (new_item->getName() != new_name) && !new_name.empty())
+ {
+ new_item->rename(childGetText("name"));
+ }
+
if(mObjectUUID.notNull())
{
// must be in an object