We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 2dca1cb commit 534e1bcCopy full SHA for 534e1bc
src/app/composer/qgscomposer.cpp
@@ -453,8 +453,20 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
453
void QgsComposer::on_mActionPrint_triggered()
454
{
455
QPrinter printer;
456
+ //portrait or landscape
457
+ if ( mComposition )
458
+ {
459
+ if ( mComposition->paperWidth() >= mComposition->paperHeight() )
460
461
+ printer.setOrientation( QPrinter::Landscape );
462
+ }
463
+ else
464
465
+ printer.setOrientation( QPrinter::Portrait );
466
467
468
+ QPrintDialog printDialog( &printer, 0 );
469
- QPrintDialog printDialog( &printer );
470
if ( printDialog.exec() != QDialog::Accepted )
471
return;
472
0 commit comments