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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Jan 13 09:58:36 EST 2009


Author: mhugent
Date: 2009-01-13 09:58:36 -0500 (Tue, 13 Jan 2009)
New Revision: 9969

Modified:
   branches/Version-1_0/src/gui/qgsmapcanvas.cpp
   branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp
Log:
Applied patch2 for #1016 also for version 1

Modified: branches/Version-1_0/src/gui/qgsmapcanvas.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsmapcanvas.cpp	2009-01-13 14:58:12 UTC (rev 9968)
+++ branches/Version-1_0/src/gui/qgsmapcanvas.cpp	2009-01-13 14:58:36 UTC (rev 9969)
@@ -811,8 +811,8 @@
     int height = lastSize.height();
     lastSize = QSize( -1, -1 );
 
-    //set map size before scene size seems to solve the white box problem
-    //when moving rubber bands
+    //set map size before scene size helps keep scene indexes updated properly
+    // this was the cause of rubberband artifacts
     mMap->resize( QSize( width, height ) );
     mScene->setSceneRect( QRectF( 0, 0, width, height ) );
 

Modified: branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp	2009-01-13 14:58:12 UTC (rev 9968)
+++ branches/Version-1_0/src/gui/qgsmapcanvasmap.cpp	2009-01-13 14:58:36 UTC (rev 9969)
@@ -48,6 +48,8 @@
 
 void QgsMapCanvasMap::resize( QSize size )
 {
+  prepareGeometryChange();	// to keep QGraphicsScene indexes up to date on size change
+
   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() );



More information about the QGIS-commit mailing list