From a2f360360cbb8f567bc32d7fc1d668f238806483 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 12 Nov 2015 10:02:13 +0100 Subject: If the paper value is greater than DMPAPER_LAST then it is a custom size Ideally all printer drivers would add beyond DMPAPER_USER for their custom sizes. However some printer drivers add beyond DMPAPER_LAST instead so we need to check if the value is past DMPAPER_LAST and consider those as a custom size. Task-number: QTBUG-47272 Change-Id: I1bcb01c08fe605cc484769b0301cfcd7b8f66157 Reviewed-by: Friedemann Kleint --- src/printsupport/kernel/qprintengine_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/printsupport') diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp index a4209d833a..707847ba3f 100644 --- a/src/printsupport/kernel/qprintengine_win.cpp +++ b/src/printsupport/kernel/qprintengine_win.cpp @@ -1633,7 +1633,7 @@ void QWin32PrintEnginePrivate::updatePageLayout() // Update orientation first as is needed to obtain printable margins when changing page size m_pageLayout.setOrientation(devMode->dmOrientation == DMORIENT_LANDSCAPE ? QPageLayout::Landscape : QPageLayout::Portrait); - if (devMode->dmPaperSize >= DMPAPER_USER) { + if (devMode->dmPaperSize >= DMPAPER_LAST) { // Is a custom size QPageSize pageSize = QPageSize(QSizeF(devMode->dmPaperWidth / 10.0f, devMode->dmPaperLength / 10.0f), QPageSize::Millimeter); -- cgit v1.2.3