diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-07-26 19:57:57 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-07-28 11:39:25 +0300 |
commit | ed5afc510ed4d0756aadbadd57d8b58f37857ef1 (patch) | |
tree | 4b4a398bb4dfd80431a298b5a0f47737d2ccaf80 /qt-ui/templateedit.cpp | |
parent | d41d79b549cdfb0ff3c785eae09a504a46fb4b96 (diff) | |
download | subsurface-ed5afc510ed4d0756aadbadd57d8b58f37857ef1.tar.gz |
Printing: don't name color templates with confusing numbers
Use the color_palette enum instead.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/templateedit.cpp')
-rw-r--r-- | qt-ui/templateedit.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qt-ui/templateedit.cpp b/qt-ui/templateedit.cpp index c26740506..6df11ea79 100644 --- a/qt-ui/templateedit.cpp +++ b/qt-ui/templateedit.cpp @@ -92,13 +92,13 @@ void TemplateEdit::on_colorpalette_currentIndexChanged(int index) { newTemplateOptions.color_palette_index = index; switch (newTemplateOptions.color_palette_index) { - case 0: // almond + case ALMOND: // almond newTemplateOptions.color_palette = almond_colors; break; - case 1: // blueshades + case BLUESHADES: // blueshades newTemplateOptions.color_palette = blueshades_colors; break; - case 2: // custom + case CUSTOM: // custom newTemplateOptions.color_palette = custom_colors; break; } @@ -147,11 +147,11 @@ void TemplateEdit::colorSelect(QAbstractButton *button) { // reset custom colors palette switch (newTemplateOptions.color_palette_index) { - case 0: // almond + case ALMOND: // almond newTemplateOptions.color_palette = almond_colors; custom_colors = newTemplateOptions.color_palette; break; - case 1: // blueshades + case BLUESHADES: // blueshades newTemplateOptions.color_palette = blueshades_colors; custom_colors = newTemplateOptions.color_palette; break; @@ -181,6 +181,6 @@ void TemplateEdit::colorSelect(QAbstractButton *button) newTemplateOptions.color_palette.color5 = color; break; } - newTemplateOptions.color_palette_index = 2; + newTemplateOptions.color_palette_index = CUSTOM; updatePreview(); } |