diff options
-rw-r--r-- | qt-ui/printoptions.cpp | 8 | ||||
-rw-r--r-- | qt-ui/printoptions.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp index cd38e3560..08be76588 100644 --- a/qt-ui/printoptions.cpp +++ b/qt-ui/printoptions.cpp @@ -8,15 +8,15 @@ PrintOptions::PrintOptions(QWidget *parent, struct print_options *printOpt, stru ui.setupUi(this); if (parent) setParent(parent); - if (!printOpt) + if (!printOpt || !templateOpt) return; - setup(printOpt); templateOptions = templateOpt; + printOptions = printOpt; + setup(); } -void PrintOptions::setup(struct print_options *printOpt) +void PrintOptions::setup() { - printOptions = printOpt; // print type radio buttons switch (printOptions->type) { case print_options::DIVELIST: diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h index 1d806b116..c33addc83 100644 --- a/qt-ui/printoptions.h +++ b/qt-ui/printoptions.h @@ -27,7 +27,7 @@ class PrintOptions : public QWidget { public: explicit PrintOptions(QWidget *parent, struct print_options *printOpt, struct template_options *templateOpt); - void setup(struct print_options *printOpt); + void setup(); private: Ui::PrintOptions ui; |