mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Avoid overwriting of printing page with width/height from composition
git-svn-id: http://svn.osgeo.org/qgis/trunk@14082 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
3ccbb98e1a
commit
07e13be848
@ -495,19 +495,7 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
|
||||
|
||||
void QgsComposer::on_mActionPrint_triggered()
|
||||
{
|
||||
//QPrinter printer;
|
||||
if ( mComposition )
|
||||
{
|
||||
if ( mComposition->paperWidth() >= mComposition->paperHeight() )
|
||||
{
|
||||
mPrinter.setOrientation( QPrinter::Landscape );
|
||||
}
|
||||
else
|
||||
{
|
||||
mPrinter.setOrientation( QPrinter::Portrait );
|
||||
}
|
||||
}
|
||||
mPrinter.setPaperSize( QSizeF( mComposition->paperWidth(), mComposition->paperHeight() ), QPrinter::Millimeter );
|
||||
//orientation and page size are already set to QPrinter in the page setup dialog
|
||||
QPrintDialog printDialog( &mPrinter, 0 );
|
||||
if ( printDialog.exec() != QDialog::Accepted )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user