summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/printoptions.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-11-12 19:27:11 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-11-12 11:20:54 -0800
commit0272f118aeff4b9e7e5c08edcc664e9a9ab26368 (patch)
tree3713a5372b9d496cc3ced0b9725cf3de7abdab62 /desktop-widgets/printoptions.cpp
parent6d93a14d18923480390e6cd04b3a1542f75480ea (diff)
downloadsubsurface-0272f118aeff4b9e7e5c08edcc664e9a9ab26368.tar.gz
printing: properly initialize DPI value
The DPI value in the print_options structure was never initialized. This could lead to random DPI values and crashes. How this ever worked is a mystery. Therefore, read and write the DPI value from the settings just as the other print-options. And initialize the corresponding dialog widget to this value. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/printoptions.cpp')
-rw-r--r--desktop-widgets/printoptions.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/printoptions.cpp b/desktop-widgets/printoptions.cpp
index fbd03c127..215762db5 100644
--- a/desktop-widgets/printoptions.cpp
+++ b/desktop-widgets/printoptions.cpp
@@ -38,6 +38,9 @@ void PrintOptions::setup()
ui.printInColor->setChecked(printOptions->color_selected);
ui.printSelected->setChecked(printOptions->print_selected);
+ // resolution
+ ui.resolution->setValue(printOptions->resolution);
+
// connect slots only once
if (hasSetupSlots)
return;