We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a90d51 commit 878e9c8Copy full SHA for 878e9c8
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