diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/printdialog.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index 002f9b9f4..cf08062d2 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -178,15 +178,8 @@ void PrintDialog::printClicked(void) { QPrintDialog printDialog(&qprinter, this); if (printDialog.exec() == QDialog::Accepted) { - switch (printOptions.type) { - case print_options::DIVELIST: - connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int))); - printer->print(); - break; - case print_options::STATISTICS: - printer->print_statistics(); - break; - } + connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int))); + printer->print(); close(); } } @@ -194,14 +187,7 @@ void PrintDialog::printClicked(void) void PrintDialog::onPaintRequested(QPrinter *printerPtr) { connect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int))); - switch (printOptions.type) { - case print_options::DIVELIST: - printer->print(); - break; - case print_options::STATISTICS: - printer->print_statistics(); - break; - } + printer->print(); progressBar->setValue(0); disconnect(printer, SIGNAL(progessUpdated(int)), progressBar, SLOT(setValue(int))); } |