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@12101 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Nov 13, 2009
1 parent 1a90d51 commit 878e9c80f1399368fd384fc1beb71a6cc7d1b717
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 878e9c8

Please sign in to comment.