Skip to content

Commit

Permalink
Avoid overwriting of printing page with width/height from composition
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14082 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Aug 14, 2010
1 parent 3ccbb98 commit 07e13be
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 07e13be

Please sign in to comment.