diff --git a/glabels/ColorHistory.cpp b/glabels/ColorHistory.cpp
index 0175301..ba564de 100644
--- a/glabels/ColorHistory.cpp
+++ b/glabels/ColorHistory.cpp
@@ -77,7 +77,20 @@ namespace glabels
for ( QString& nameColor : readNameColorList() )
{
QStringList v = nameColor.split( ':' );
- colorList << QColor( v[1] );
+ if ( v.size() == 2 )
+ {
+ colorList << QColor( v[1] );
+ }
+ else if ( v.size() == 1 )
+ {
+ // Old-style, no name
+ colorList << QColor( v[0] );
+ }
+ else
+ {
+ // Should not happen
+ qWarning() << "Invalid color history.";
+ }
}
return colorList;
@@ -91,7 +104,20 @@ namespace glabels
for ( QString& nameColor : readNameColorList() )
{
QStringList v = nameColor.split( ':' );
- nameList << v[0];
+ if ( v.size() == 2 )
+ {
+ nameList << v[0];
+ }
+ else if ( v.size() == 1 )
+ {
+ // Old-style, no name
+ nameList << QString(tr("color %1")).arg( v[0] );
+ }
+ else
+ {
+ // Should not happen
+ qWarning() << "Invalid color history.";
+ }
}
return nameList;
diff --git a/translations/glabels_C.ts b/translations/glabels_C.ts
index 666ef04..10ece40 100644
--- a/translations/glabels_C.ts
+++ b/translations/glabels_C.ts
@@ -1127,6 +1127,13 @@
+
+ glabels::ColorHistory
+
+ color %1
+
+
+
glabels::ColorPaletteDialog
@@ -1154,6 +1161,10 @@
%1 = color specification in hex. String must not contain a colon (:).
+
+ Custom color #%1
+
+
glabels::FieldButton
@@ -1912,6 +1923,14 @@
Shadow
+
+ Insert Field
+
+
+
+ Selected File...
+
+
glabels::PrintView