From d9ee8c7626f4cb6fb1814be8e27addccd4e59963 Mon Sep 17 00:00:00 2001 From: John Layt Date: Wed, 27 Nov 2013 10:24:51 +0100 Subject: 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 (cherry picked from qtbase/9927c1a2bbb372d0e557c58062e4ecda7a644aa1) --- src/gui/dialogs/qprintdialog_win.cpp | 6 ++++-- 1 file 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; -- cgit v1.2.3