diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 6210973dae262961f00898c9dfc21a74d621db50..45fc3d46882009b27c0c27c2ff59b883420db948 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 3bed2d36c20ad8582ac2dfdb5b36b3d18838a643..31dc83e75a3124e7404da3c2ce504f36674fe170 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 c4b7fdaa234f9bdf21b57e8bb615161c7c8711f6..917b8747eaab195df6c244bb02263ec5a3ad074e 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -66,6 +66,7 @@ class LLViewerInventoryItem : public LLInventoryItem, public boost::signals2::tr 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);