[QGIS Commit] r11766 - trunk/qgis/src/app/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Oct 7 13:47:36 EDT 2009


Author: mhugent
Date: 2009-10-07 13:47:34 -0400 (Wed, 07 Oct 2009)
New Revision: 11766

Modified:
   trunk/qgis/src/app/composer/qgscomposer.cpp
Log:
Fix for bug #1980, pdf paper size

Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp	2009-10-07 16:02:54 UTC (rev 11765)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp	2009-10-07 17:47:34 UTC (rev 11766)
@@ -481,6 +481,7 @@
 
   printer.setOutputFormat( QPrinter::PdfFormat );
   printer.setOutputFileName( myOutputFileNameQString );
+  printer.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );
 
   print( printer );
 }
@@ -506,16 +507,6 @@
     showWMSPrintingWarning();
   }
 
-  //try to set most of the print dialog settings based on composer properties
-  if ( mComposition->paperHeight() > mComposition->paperWidth() )
-  {
-    printer.setOrientation( QPrinter::Portrait );
-  }
-  else
-  {
-    printer.setOrientation( QPrinter::Landscape );
-  }
-
   //set resolution based on composer setting
   printer.setFullPage( true );
   printer.setColorMode( QPrinter::Color );



More information about the QGIS-commit mailing list