summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-11-27 09:24:51 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-27 20:52:39 (GMT)
commitd9ee8c7626f4cb6fb1814be8e27addccd4e59963 (patch)
tree5d8218772c0cd32d57a75e0d4a795fabe15e03e8 /src
parentd65ee085d8bbb46c462f91e5f113bb82ffce753f (diff)
downloadQt-d9ee8c7626f4cb6fb1814be8e27addccd4e59963.zip
Qt-d9ee8c7626f4cb6fb1814be8e27addccd4e59963.tar.gz
Qt-d9ee8c7626f4cb6fb1814be8e27addccd4e59963.tar.bz2
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')
-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 a284d8f..00c7fcb 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;