Skip to content

Commit e5a9ff9

Browse files
author
mhugent
committed
Applied patch2 for #1016
git-svn-id: http://svn.osgeo.org/qgis/trunk@9968 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 93fc3c9 commit e5a9ff9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/gui/qgsmapcanvas.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,8 @@ void QgsMapCanvas::resizeEvent( QResizeEvent * e )
811811
int height = lastSize.height();
812812
lastSize = QSize( -1, -1 );
813813

814-
//set map size before scene size seems to solve the white box problem
815-
//when moving rubber bands
814+
//set map size before scene size helps keep scene indexes updated properly
815+
// this was the cause of rubberband artifacts
816816
mMap->resize( QSize( width, height ) );
817817
mScene->setSceneRect( QRectF( 0, 0, width, height ) );
818818

src/gui/qgsmapcanvasmap.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ QRectF QgsMapCanvasMap::boundingRect() const
4848

4949
void QgsMapCanvasMap::resize( QSize size )
5050
{
51+
prepareGeometryChange(); // to keep QGraphicsScene indexes up to date on size change
52+
5153
mPixmap = QPixmap( size );
5254
mImage = QImage( size, QImage::Format_RGB32 ); // temporary image - build it here so it is available when switching from QPixmap to QImage rendering
5355
mCanvas->mapRenderer()->setOutputSize( size, mPixmap.logicalDpiX() );

0 commit comments

Comments
 (0)