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>
bb10
unknown 2013-11-03 21:20:35 +01:00 committed by The Qt Project
parent 1f6dfa7749
commit 9927c1a2bb
1 changed files with 4 additions and 2 deletions

View File

@ -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;