On 13. 02. 14 09:45, Radim Blazek wrote:
On Thu, Feb 13, 2014 at 9:04 AM, Denis Rouzaud <[email protected]> wrote:
Hi Radim,
It seems it is your point that has been deleted, not the rubber band.
Doing "print point" before addPoint crashes.
Good, thanks and sorry for false pointing to rubber band.
However, do you have any idea where the point may be deleted? The
points are acquired from QgsGeometry.asPolyline() which returns
QVector<QgsPoint>, i.e. list of values. The points are then add to
another list: result.extend( pnts[1:-1] ). Is it wrong? The points get
deleted with original list?
I suppose you need to do a copy of your point in the result of the snapping.
do: point = QgsPoint( result[0].snappedVertex )
otherwise, result get out of scope at the end of the method and your
point is deleted.
Cheers,
Denis
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer