File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -1106,11 +1106,9 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::printPrivate( QPrinter &print
11061106
11071107void QgsLayoutExporter::updatePrinterPageSize ( QgsLayout *layout, QPrinter &printer, int page )
11081108{
1109- // must set orientation to portrait before setting paper size, otherwise size will be flipped
1110- // for landscape sized outputs (#11352)
1111- printer.setOrientation ( QPrinter::Portrait );
11121109 QgsLayoutSize pageSize = layout->pageCollection ()->page ( page )->sizeWithUnits ();
11131110 QgsLayoutSize pageSizeMM = layout->renderContext ().measurementConverter ().convert ( pageSize, QgsUnitTypes::LayoutMillimeters );
1111+ printer.setOrientation ( layout->pageCollection ()->page ( page )->orientation () == QgsLayoutItemPage::Portrait ? QPrinter::Portrait : QPrinter::Landscape );
11141112 printer.setPaperSize ( pageSizeMM.toQSizeF (), QPrinter::Millimeter );
11151113}
11161114
You can’t perform that action at this time.
0 commit comments