Skip to content

Commit 8ee164d

Browse files
author
mhugent
committedNov 13, 2009
page size also for print mode
git-svn-id: http://svn.osgeo.org/qgis/trunk@12102 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 878e9c8 commit 8ee164d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
453453
void QgsComposer::on_mActionPrint_triggered()
454454
{
455455
QPrinter printer;
456-
//portrait or landscape
457456
if ( mComposition )
458457
{
459458
if ( mComposition->paperWidth() >= mComposition->paperHeight() )
@@ -465,10 +464,12 @@ void QgsComposer::on_mActionPrint_triggered()
465464
printer.setOrientation( QPrinter::Portrait );
466465
}
467466
}
467+
printer.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );
468468
QPrintDialog printDialog( &printer, 0 );
469-
470469
if ( printDialog.exec() != QDialog::Accepted )
470+
{
471471
return;
472+
}
472473

473474
print( printer );
474475
}

0 commit comments

Comments
 (0)
Please sign in to comment.