summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-11-27 10:24:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-27 21:52:39 +0100
commitd9ee8c7626f4cb6fb1814be8e27addccd4e59963 (patch)
tree5d8218772c0cd32d57a75e0d4a795fabe15e03e8 /src/gui/dialogs
parentd65ee085d8bbb46c462f91e5f113bb82ffce753f (diff)
QPrintDialog - Fix Windows Current Page option selection
In the Windows print dialog default the print range radio button selection to the QPrinter set value, but only if the option is enabled in the dialog. Task-number: QTBUG-32965 Change-Id: I1093ff9d55c0ec578fc2c112874662deb32e1b4d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (cherry picked from qtbase/9927c1a2bbb372d0e557c58062e4ecda7a644aa1)
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/qprintdialog_win.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/dialogs/qprintdialog_win.cpp b/src/gui/dialogs/qprintdialog_win.cpp
index a284d8fdd1..00c7fcb303 100644
--- a/src/gui/dialogs/qprintdialog_win.cpp
+++ b/src/gui/dialogs/qprintdialog_win.cpp
@@ -116,10 +116,12 @@ static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent,
if(!pdlg->isOptionEnabled(QPrintDialog::PrintToFile))
pd->Flags |= PD_DISABLEPRINTTOFILE;
- if (pdlg->printRange() == QPrintDialog::Selection)
+ if (pdlg->isOptionEnabled(QPrintDialog::PrintSelection) && pdlg->printRange() == QPrintDialog::Selection)
pd->Flags |= PD_SELECTION;
- else if (pdlg->printRange() == QPrintDialog::PageRange)
+ else if (pdlg->isOptionEnabled(QPrintDialog::PrintPageRange) && pdlg->printRange() == QPrintDialog::PageRange)
pd->Flags |= PD_PAGENUMS;
+ else if (pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage) && pdlg->printRange() == QPrintDialog::CurrentPage)
+ pd->Flags |= PD_CURRENTPAGE;
else
pd->Flags |= PD_ALLPAGES;