diff --git a/mainwindow.cpp b/mainwindow.cpp index 3f86697..ea86670 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -487,9 +487,8 @@ void MainWindow::printAllSheets() { //i.e. while printing all sheets renderNextSheet(); - if (printer.fromPage() != 0 && printer.fromPage() > currentSheetNumber + 1) - continue; - if (printer.toPage() != 0 && printer.toPage() < currentSheetNumber + 1) + if ((printer.fromPage() != 0 && printer.fromPage() > currentSheetNumber + 1) //we're not going out of page range + || (printer.toPage() != 0 && printer.toPage() < currentSheetNumber + 1)) //defined by user continue; QImage image = ui->svgView->saveRenderToImage(); @@ -499,11 +498,9 @@ void MainWindow::printAllSheets() painter.drawImage(0, 0, image); - if (ui->toolBar->actions()[ToolButton::Next]->isEnabled() //if "Next Sheet" tool button is enabled, - && (printer.toPage() != 0 //i.e this sheet is not the last, - && currentSheetNumber + 1 < printer.toPage())) //and we're not going out of page range - printer.newPage(); //defined by user - } + if (ui->toolBar->actions()[ToolButton::Next]->isEnabled()) //if "Next Sheet" tool button is enabled, + printer.newPage(); //i.e this sheet is not the last, + } painter.end(); ui->svgView->hideBorders(false); @@ -554,6 +551,7 @@ void MainWindow::preparePrinter(QPrinter *printer) printer->setPaperSize(paperSize, QPrinter::Millimeter); printer->setResolution(settings.value("dpi", 300).toInt()); printer->setOrientation(isPortrait ? QPrinter::Portrait : QPrinter::Landscape); + printer->setDoubleSidedPrinting(true); settings.endGroup(); }