diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-11-12 10:02:13 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-11-23 12:22:19 +0000 |
commit | a2f360360cbb8f567bc32d7fc1d668f238806483 (patch) | |
tree | 1322788c34dfa61e88c906422a59664b185bf0c2 /src/printsupport | |
parent | b21c219811f2363002e3cc96c8cfef849aaa95a4 (diff) |
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 <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/printsupport')
-rw-r--r-- | src/printsupport/kernel/qprintengine_win.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |