diff options
-rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.h | 1 |
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, |