patch2_for_1016.txt
| 1 |
Index: src/gui/qgsmapcanvasmap.cpp |
|---|---|
| 2 |
=================================================================== |
| 3 |
--- src/gui/qgsmapcanvasmap.cpp (revision 9954) |
| 4 |
+++ src/gui/qgsmapcanvasmap.cpp (working copy) |
| 5 |
@@ -48,6 +48,8 @@ |
| 6 |
|
| 7 |
void QgsMapCanvasMap::resize( QSize size ) |
| 8 |
{
|
| 9 |
+ prepareGeometryChange(); // to keep QGraphicsScene indexes up to date on size change |
| 10 |
+ |
| 11 |
mPixmap = QPixmap( size ); |
| 12 |
mImage = QImage( size, QImage::Format_RGB32 ); // temporary image - build it here so it is available when switching from QPixmap to QImage rendering |
| 13 |
mCanvas->mapRenderer()->setOutputSize( size, mPixmap.logicalDpiX() ); |
| 14 |
Index: src/gui/qgsmapcanvas.cpp |
| 15 |
=================================================================== |
| 16 |
--- src/gui/qgsmapcanvas.cpp (revision 9954) |
| 17 |
+++ src/gui/qgsmapcanvas.cpp (working copy) |
| 18 |
@@ -811,8 +811,8 @@ |
| 19 |
int height = lastSize.height(); |
| 20 |
lastSize = QSize( -1, -1 ); |
| 21 |
|
| 22 |
- //set map size before scene size seems to solve the white box problem |
| 23 |
- //when moving rubber bands |
| 24 |
+ //set map size before scene size helps keep scene indexes updated properly |
| 25 |
+ // this was the cause of rubberband artifacts |
| 26 |
mMap->resize( QSize( width, height ) ); |
| 27 |
mScene->setSceneRect( QRectF( 0, 0, width, height ) ); |
| 28 |
|