Skip to content

Commit

Permalink
Applied patch2 for #1016
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9968 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 13, 2009
1 parent 93fc3c9 commit e5a9ff9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -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 ) );

Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgsmapcanvasmap.cpp
Expand Up @@ -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() );
Expand Down

0 comments on commit e5a9ff9

Please sign in to comment.