From dfc7239e9f4a91bb6c32b80544d92012d92b410d Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 21 Feb 2016 16:44:25 -0500 Subject: Apply from patch from houz (Fixes color profile name mangling) Fixed bugs: - https://launchpad.net/bugs/1457105 (bzr r14663) --- src/ui/dialog/document-properties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 7cd48e62e..c2c5c5005 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -448,13 +448,13 @@ void DocumentProperties::populate_available_profiles(){ */ static void sanitizeName( Glib::ustring& str ) { - if (str.size() > 1) { + if (str.size() > 0) { char val = str.at(0); if (((val < 'A') || (val > 'Z')) && ((val < 'a') || (val > 'z')) && (val != '_') && (val != ':')) { - str.replace(0, 1, "-"); + str.insert(0, "_"); } for (Glib::ustring::size_type i = 1; i < str.size(); i++) { char val = str.at(i); -- cgit v1.2.3