Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dont set print to file because of bug in Qt<=4.2.2
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6194 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Dec 6, 2006
1 parent 563c927 commit 1b330fc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/composer/qgscomposer.cpp
Expand Up @@ -285,8 +285,11 @@ void QgsComposer::on_mActionPrint_activated(void)
// The Mac Print dialog provides an option to create a pdf which is
// intended to be invisible to the application. If an eps is desired,
// a custom Mac Print dialog is needed.
mPrinter->setOutputToFile (true ) ;
mPrinter->setOutputFileName ( QDir::convertSeparators ( QDir::home().path() + "/" + "qgis.eps") );

// There is a bug in Qt<=4.2.2 (dialog is not correct) if output is set to file
// => disable until they fix it
//mPrinter->setOutputToFile (true ) ;
//mPrinter->setOutputFileName ( QDir::convertSeparators ( QDir::home().path() + "/" + "qgis.eps") );
#endif

if ( mComposition->paperOrientation() == QgsComposition::Portrait ) {
Expand All @@ -297,6 +300,12 @@ void QgsComposer::on_mActionPrint_activated(void)
mPrinter->setColorMode ( QPrinter::Color );
mPrinter->setPageSize ( QPrinter::A4 );
}
else
{
// Because of bug in Qt<=4.2.2 (dialog is not correct) we have to reset always
// to printer otherwise print to file is checked but printer combobox is in dialog
mPrinter->setOutputToFile (false) ;
}

mPrinter->setResolution ( mComposition->resolution() );

Expand Down

0 comments on commit 1b330fc

Please sign in to comment.