[QGIS Commit] r9892 - branches/Version-1_0/src/gui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Dec 23 05:06:19 EST 2008


Author: mhugent
Date: 2008-12-23 05:06:19 -0500 (Tue, 23 Dec 2008)
New Revision: 9892

Modified:
   branches/Version-1_0/src/gui/qgsmapcanvas.cpp
   branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp
Log:
Apply patch to fix bug #1171 also to version 1

Modified: branches/Version-1_0/src/gui/qgsmapcanvas.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsmapcanvas.cpp	2008-12-23 10:02:37 UTC (rev 9891)
+++ branches/Version-1_0/src/gui/qgsmapcanvas.cpp	2008-12-23 10:06:19 UTC (rev 9892)
@@ -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: branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp	2008-12-23 10:02:37 UTC (rev 9891)
+++ branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp	2008-12-23 10:06:19 UTC (rev 9892)
@@ -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