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>
This commit is contained in:
Berthold Stoeger 2020-11-12 19:27:11 +01:00 committed by Dirk Hohndel
parent 6d93a14d18
commit 0272f118ae
2 changed files with 5 additions and 0 deletions

View file

@ -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;