Skip to content
Permalink
Browse files
Applied Smizunos patch that fixes bug #1171
git-svn-id: http://svn.osgeo.org/qgis/trunk@9891 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 23, 2008
1 parent 600f531 commit aa7820935df0af64b98a105633e557b149431875
Showing with 2 additions and 2 deletions.
  1. +1 −0 src/gui/qgsmapcanvas.cpp
  2. +1 −2 src/gui/qgsmapcanvasmap.cpp
@@ -160,6 +160,7 @@ void QgsMapCanvas::enableAntiAliasing( bool theFlag )
void QgsMapCanvas::useImageToRender( bool theFlag )
{
mMap->useImageToRender( theFlag );
refresh(); // redraw the map on change - prevents black map view
}

QgsMapCanvasMap* QgsMapCanvas::map()
@@ -49,6 +49,7 @@ QRectF QgsMapCanvasMap::boundingRect() const
void QgsMapCanvasMap::resize( QSize size )
{
mPixmap = QPixmap( size );
mImage = QImage( size, QImage::Format_RGB32 ); // temporary image - build it here so it is available when switching from QPixmap to QImage rendering
mCanvas->mapRenderer()->setOutputSize( size, mPixmap.logicalDpiX() );
}

@@ -68,8 +69,6 @@ void QgsMapCanvasMap::render()
if ( mUseQImageToRender )
{
// use temporary image for rendering
mImage = QImage( boundingRect().size().toSize(), QImage::Format_RGB32 );

mImage.fill( mBgColor.rgb() );

QPainter paint;

0 comments on commit aa78209

Please sign in to comment.