Skip to content
Permalink
Browse files
Initialize portrait / landscape in print dialog based on composition …
…width and height. Fixes bug #2080

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12101 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 13, 2009
1 parent 2dca1cb commit 534e1bcf5b85cda33385f6b5b395e4434aed4d9c
Showing with 13 additions and 1 deletion.
  1. +13 −1 src/app/composer/qgscomposer.cpp
@@ -453,8 +453,20 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
void QgsComposer::on_mActionPrint_triggered()
{
QPrinter printer;
//portrait or landscape
if ( mComposition )
{
if ( mComposition->paperWidth() >= mComposition->paperHeight() )
{
printer.setOrientation( QPrinter::Landscape );
}
else
{
printer.setOrientation( QPrinter::Portrait );
}
}
QPrintDialog printDialog( &printer, 0 );

QPrintDialog printDialog( &printer );
if ( printDialog.exec() != QDialog::Accepted )
return;

0 comments on commit 534e1bc

Please sign in to comment.