mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Printing: fix issue with old QSettings group
As I am using the same old QSettings group name, some variables may not be correctly initialized, so we need to check for incorrect values before we start. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
2a85be91b1
commit
7f8d20c09d
1 changed files with 8 additions and 0 deletions
|
@ -56,6 +56,14 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
|
|||
custom_colors.color5 = QColor(s.value("custom_color_5").toString());
|
||||
}
|
||||
|
||||
// handle cases from old QSettings group
|
||||
if (templateOptions.font_size < 9) {
|
||||
templateOptions.font_size = 9;
|
||||
}
|
||||
if (templateOptions.line_spacing < 1) {
|
||||
templateOptions.line_spacing = 1;
|
||||
}
|
||||
|
||||
switch (templateOptions.color_palette_index) {
|
||||
case 0: // almond
|
||||
templateOptions.color_palette = almond_colors;
|
||||
|
|
Loading…
Add table
Reference in a new issue