mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Applied patch2 for #1016
git-svn-id: http://svn.osgeo.org/qgis/trunk@9968 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
93fc3c9eb6
commit
e5a9ff92af
@ -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() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user