From 5c4ab75cdab1b9de08d482457f9d245dd18b90da Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Mon, 18 Jan 2010 13:18:46 +0200 Subject: Fixed low bug EXT-4306 - Landmark name is shown with prefix in the group notice attachment. --HG-- branch : product-engine --- indra/newview/llpanelgroupnotices.cpp | 2 +- indra/newview/llviewerinventory.cpp | 9 +++++++++ indra/newview/llviewerinventory.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'indra') 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); -- cgit v1.2.3