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>
This commit is contained in:
parent
b21c219811
commit
a2f360360c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user