changeset 117:71cfb7d96cfc

If printer object->fromPage() and toPage() return 0, we are supposed to print all pages, thus adjust accordingly.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 05 Jul 2017 15:08:54 +0300
parents e03f6adf108d
children b982ac0fdae4
files src/main.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.cpp	Wed Jul 05 12:53:13 2017 +0300
+++ b/src/main.cpp	Wed Jul 05 15:08:54 2017 +0300
@@ -580,6 +580,10 @@
     if (!ret)
         return;
 
+    // If from and to are 0, we are supposed to print all pages
+    if (printer->fromPage() == 0 && printer->toPage() == 0)
+        printer->setFromTo(1, pinfo.npages);
+
     // Setup rest of the progress dialog here
     progress.setWindowModality(Qt::ApplicationModal);
     progress.setMinimum(printer->fromPage() - 1);