summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Polunin <apolunin@productengine.com>2009-11-19 19:51:47 +0200
committerAndrew Polunin <apolunin@productengine.com>2009-11-19 19:51:47 +0200
commit9b9c11778cd5d71f3b238ca5bd5b69e118d97be9 (patch)
tree78a3ea91cc6a30fbc458cbe585cd3f54b85460c5
parent910f25a32ce1d287788b0c184a530c2c450391fa (diff)
fixed minor bug EXT-1615 Landmark name is truncated before @ character after placing landmark on Favorites Bar
--HG-- branch : product-engine
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp6
-rw-r--r--indra/newview/llviewerinventory.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index f94a59ecef..5de7c3f851 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -352,6 +352,8 @@ void LLPanelLandmarkInfo::createLandmark(const LLUUID& folder_id)
}
LLStringUtil::replaceChar(desc, '\n', ' ');
+ LLViewerInventoryItem::insertDefaultSortField(name);
+
// If no folder chosen use the "Landmarks" folder.
LLLandmarkActions::createLandmarkHere(name, desc,
folder_id.notNull() ? folder_id : gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK));
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 089535dfab..87d256b60a 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1336,6 +1336,12 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na
return result;
}
+void LLViewerInventoryItem::insertDefaultSortField(std::string& name)
+{
+ name.insert(0, std::string("1") + getSeparator());
+}
+
+
// This returns true if the item that this item points to
// doesn't exist in memory (i.e. LLInventoryModel). The baseitem
// might still be in the database but just not loaded yet.
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 529425aa25..d27faffdd9 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -81,6 +81,7 @@ public:
virtual U32 getCRC32() const; // really more of a checksum.
static BOOL extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName);
+ static void insertDefaultSortField(std::string& name);
// construct a complete viewer inventory item
LLViewerInventoryItem(const LLUUID& uuid, const LLUUID& parent_uuid,