Skip to content
Permalink
Browse files

Applied patch2 for #1016

git-svn-id: http://svn.osgeo.org/qgis/trunk@9968 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jan 13, 2009
1 parent 93fc3c9 commit e5a9ff92affb2c9ad1d2dd793403f46cb646d962
Showing with 4 additions and 2 deletions.
  1. +2 −2 src/gui/qgsmapcanvas.cpp
  2. +2 −0 src/gui/qgsmapcanvasmap.cpp
@@ -811,8 +811,8 @@ void QgsMapCanvas::resizeEvent( QResizeEvent * e )
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 ) );

@@ -48,6 +48,8 @@ QRectF QgsMapCanvasMap::boundingRect() const

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() );

0 comments on commit e5a9ff9

Please sign in to comment.
You can’t perform that action at this time.