Skip to content

Commit

Permalink
Applied Smizunos patch that fixes bug #1171
Browse files Browse the repository at this point in the history
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 aa78209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions src/gui/qgsmapcanvasmap.cpp
Expand Up @@ -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() );
}

Expand All @@ -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;
Expand Down

0 comments on commit aa78209

Please sign in to comment.