summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-01-18 13:18:46 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-01-18 13:18:46 +0200
commit5c4ab75cdab1b9de08d482457f9d245dd18b90da (patch)
tree91c40baea1fc89df4b762a265dc397efd8e0e97c
parentb2379c90486c6a9be5ffb97d6c5d5d6791a9ff6e (diff)
Fixed low bug EXT-4306 - Landmark name is shown with prefix in the group notice attachment.
--HG-- branch : product-engine
-rw-r--r--indra/newview/llpanelgroupnotices.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp9
-rw-r--r--indra/newview/llviewerinventory.h1
3 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 6210973dae..45fc3d4688 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -614,7 +614,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject,
mViewInventoryIcon->setVisible(TRUE);
std::stringstream ss;
- ss << " " << inventory_name;
+ ss << " " << LLViewerInventoryItem::getDisplayName(inventory_name);
mViewInventoryName->setText(ss.str());
mBtnOpenAttachment->setEnabled(TRUE);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 3bed2d36c2..31dc83e75a 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1165,6 +1165,15 @@ const std::string& LLViewerInventoryItem::getDisplayName() const
return mDisplayName = hasSortField ? result : LLInventoryItem::getName();
}
+// static
+std::string LLViewerInventoryItem::getDisplayName(const std::string& name)
+{
+ std::string result;
+ BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result);
+
+ return hasSortField ? result : name;
+}
+
S32 LLViewerInventoryItem::getSortField() const
{
S32 result;
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index c4b7fdaa23..917b8747ea 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -66,6 +66,7 @@ public:
virtual const LLUUID& getAssetUUID() const;
virtual const std::string& getName() const;
virtual const std::string& getDisplayName() const;
+ static std::string getDisplayName(const std::string& name);
virtual S32 getSortField() const;
virtual void setSortField(S32 sortField);
virtual void rename(const std::string& new_name);