[QGIS Commit] r12102 - trunk/qgis/src/app/composer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Nov 13 15:05:18 EST 2009
Author: mhugent
Date: 2009-11-13 15:05:18 -0500 (Fri, 13 Nov 2009)
New Revision: 12102
Modified:
trunk/qgis/src/app/composer/qgscomposer.cpp
Log:
page size also for print mode
Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp 2009-11-13 15:56:59 UTC (rev 12101)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp 2009-11-13 20:05:18 UTC (rev 12102)
@@ -453,7 +453,6 @@
void QgsComposer::on_mActionPrint_triggered()
{
QPrinter printer;
- //portrait or landscape
if ( mComposition )
{
if ( mComposition->paperWidth() >= mComposition->paperHeight() )
@@ -465,10 +464,12 @@
printer.setOrientation( QPrinter::Portrait );
}
}
+ printer.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );
QPrintDialog printDialog( &printer, 0 );
-
if ( printDialog.exec() != QDialog::Accepted )
+ {
return;
+ }
print( printer );
}
More information about the QGIS-commit
mailing list