]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct landscape printing in wxPageSetupDialog
authorRobert Roebling <robert@roebling.de>
Thu, 17 May 2007 10:57:14 +0000 (10:57 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 17 May 2007 10:57:14 +0000 (10:57 +0000)
    (upport from 2.8)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/printdlg.cpp

index dc78524ee582c36b31dd20fdf979721ca3c2e09d..a9b861d09f45ebc538727c506c126a14efa39e25 100644 (file)
@@ -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) );