summaryrefslogtreecommitdiff
path: root/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2009-12-15 16:27:43 -0800
committerLeyla Farazha <leyla@lindenlab.com>2009-12-15 16:27:43 -0800
commit4428d4039fdf42932b39a861566a7ed2d2c2c946 (patch)
treec93ed945ffff656b988e138cae25c610982183ed /indra/newview/llpreview.cpp
parent679983b33bc2ce577e63557b56d3d94668972ea1 (diff)
parentb76c4399833c202f6cc8a6fb903fee82e8fcd3f3 (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