diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index f94a59ecef5eec7e47a414f71cbef5dc436a75c5..5de7c3f851e375018981c7a3fdf53ba346bcaff1 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 089535dfab457351d87eeb2167b2a73b86c696d7..87d256b60a94f1231928d90d7ff6d5466c160b57 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 529425aa258800f09140cb71d7fc074acf62e65b..d27faffdd9e7c4417683e4b512a5b1e1ac79c0e6 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -81,6 +81,7 @@ class LLViewerInventoryItem : public LLInventoryItem, public boost::signals2::tr 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,