[QGIS Commit] r9891 - trunk/qgis/src/gui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Dec 23 05:02:38 EST 2008
Author: mhugent
Date: 2008-12-23 05:02:37 -0500 (Tue, 23 Dec 2008)
New Revision: 9891
Modified:
trunk/qgis/src/gui/qgsmapcanvas.cpp
trunk/qgis/src/gui/qgsmapcanvasmap.cpp
Log:
Applied Smizunos patch that fixes bug #1171
Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-12-21 22:52:26 UTC (rev 9890)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-12-23 10:02:37 UTC (rev 9891)
@@ -160,6 +160,7 @@
void QgsMapCanvas::useImageToRender( bool theFlag )
{
mMap->useImageToRender( theFlag );
+ refresh(); // redraw the map on change - prevents black map view
}
QgsMapCanvasMap* QgsMapCanvas::map()
Modified: trunk/qgis/src/gui/qgsmapcanvasmap.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvasmap.cpp 2008-12-21 22:52:26 UTC (rev 9890)
+++ trunk/qgis/src/gui/qgsmapcanvasmap.cpp 2008-12-23 10:02:37 UTC (rev 9891)
@@ -49,6 +49,7 @@
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 @@
if ( mUseQImageToRender )
{
// use temporary image for rendering
- mImage = QImage( boundingRect().size().toSize(), QImage::Format_RGB32 );
-
mImage.fill( mBgColor.rgb() );
QPainter paint;
More information about the QGIS-commit
mailing list