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
This commit is contained in:
mhugent 2010-09-15 19:57:10 +00:00
parent 0c09a41d2d
commit a953fa14e7

View File

@ -78,10 +78,8 @@ void QgsMapCanvasItem::setRect( const QgsRectangle& rect )
r = r.normalized();
}
// update the point prior to changing its position
update();
// set position in canvas where the item will have coordinate (0,0)
prepareGeometryChange();
setPos( r.topLeft() );
mItemSize = QSizeF( r.width() + 2, r.height() + 2 );