Avoid overwriting of printing page with width/height from composition

git-svn-id: http://svn.osgeo.org/qgis/trunk@14082 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2010-08-14 18:50:01 +00:00
parent 3ccbb98e1a
commit 07e13be848

View File

@ -495,19 +495,7 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
void QgsComposer::on_mActionPrint_triggered()
{
//QPrinter printer;
if ( mComposition )
{
if ( mComposition->paperWidth() >= mComposition->paperHeight() )
{
mPrinter.setOrientation( QPrinter::Landscape );
}
else
{
mPrinter.setOrientation( QPrinter::Portrait );
}
}
mPrinter.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );
//orientation and page size are already set to QPrinter in the page setup dialog
QPrintDialog printDialog( &mPrinter, 0 );
if ( printDialog.exec() != QDialog::Accepted )
{