From: Robert Roebling Date: Thu, 17 May 2007 10:57:14 +0000 (+0000) Subject: Correct landscape printing in wxPageSetupDialog X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fa4f4c58ea5c92389996db8d773aceec69b9efd3 Correct landscape printing in wxPageSetupDialog (upport from 2.8) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index dc78524ee5..a9b861d09f 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -1026,7 +1026,10 @@ bool wxWindowsPageSetupDialog::ConvertFromNative( wxPageSetupDialogData &data ) data.EnableHelp( ((pd->Flags & PSD_SHOWHELP) == PSD_SHOWHELP) ); // PAGESETUPDLG is in hundreds of a mm - data.SetPaperSize( wxSize(pd->ptPaperSize.x / 100, pd->ptPaperSize.y / 100) ); + if (data.GetPrintData().GetOrientation() == wxLANDSCAPE) + data.SetPaperSize( wxSize(pd->ptPaperSize.y / 100, pd->ptPaperSize.x / 100) ); + else + data.SetPaperSize( wxSize(pd->ptPaperSize.x / 100, pd->ptPaperSize.y / 100) ); data.SetMinMarginTopLeft( wxPoint(pd->rtMinMargin.left / 100, pd->rtMinMargin.top / 100) ); data.SetMinMarginBottomRight( wxPoint(pd->rtMinMargin.right / 100, pd->rtMinMargin.bottom / 100) );