Skip to content

Commit a953fa1

Browse files
author
mhugent
committed
Improve update of canvas item in case of size changes. Maybe fixes bug #2929
git-svn-id: http://svn.osgeo.org/qgis/trunk@14234 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 0c09a41 commit a953fa1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/gui/qgsmapcanvasitem.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,8 @@ void QgsMapCanvasItem::setRect( const QgsRectangle& rect )
7878
r = r.normalized();
7979
}
8080

81-
// update the point prior to changing its position
82-
update();
83-
8481
// set position in canvas where the item will have coordinate (0,0)
82+
prepareGeometryChange();
8583
setPos( r.topLeft() );
8684
mItemSize = QSizeF( r.width() + 2, r.height() + 2 );
8785

0 commit comments

Comments
 (0)