summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorunknown <jlayt@kde.org>2013-11-03 21:20:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-04 11:42:01 +0100
commit9927c1a2bbb372d0e557c58062e4ecda7a644aa1 (patch)
tree0f4e803d90c397f62054f1cb9a926010c5c0d595
parent1f6dfa774959830a915f3e2a7b0561ca29b8c485 (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: Ic64d86d263a2f8e31c8b32608b569499d0f24d63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--src/printsupport/dialogs/qprintdialog_win.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_win.cpp b/src/printsupport/dialogs/qprintdialog_win.cpp
index e886abbcf3..96a201ae45 100644
--- a/src/printsupport/dialogs/qprintdialog_win.cpp
+++ b/src/printsupport/dialogs/qprintdialog_win.cpp
@@ -109,10 +109,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;