Skip to content

Commit

Permalink
page size also for print mode
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12102 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 13, 2009
1 parent 878e9c8 commit 8ee164d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -453,7 +453,6 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
void QgsComposer::on_mActionPrint_triggered()
{
QPrinter printer;
//portrait or landscape
if ( mComposition )
{
if ( mComposition->paperWidth() >= mComposition->paperHeight() )
Expand All @@ -465,10 +464,12 @@ void QgsComposer::on_mActionPrint_triggered()
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 );
}
Expand Down

0 comments on commit 8ee164d

Please sign in to comment.