Skip to content
Permalink
Browse files
Fix for bug that crashed qgis when moving the first/last vertex of a …
…line

git-svn-id: http://svn.osgeo.org/qgis/trunk@8088 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 29, 2008
1 parent 04a50f6 commit c41d416d1d89d3f6728394c6032c720a32276b8e
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/core/qgsvectorlayer.cpp
@@ -2824,10 +2824,16 @@ void QgsVectorLayer::snapToGeometry(const QgsPoint& startPoint, int featureId, Q
{
snappingResultVertex.snappedVertex = snappedPoint;
snappingResultVertex.snappedVertexNr = atVertex;
snappingResultVertex.beforeVertex = geom->vertexAt(beforeVertex);
snappingResultVertex.beforeVertexNr = beforeVertex;
snappingResultVertex.afterVertex = geom->vertexAt(afterVertex);
if(beforeVertex != -1) //make sure the vertex is valid
{
snappingResultVertex.beforeVertex = geom->vertexAt(beforeVertex);
}
snappingResultVertex.afterVertexNr = afterVertex;
if(afterVertex != -1) //make sure the vertex is valid
{
snappingResultVertex.afterVertex = geom->vertexAt(afterVertex);
}
snappingResultVertex.snappedAtGeometry = featureId;
snappingResultVertex.layer = this;
}

0 comments on commit c41d416

Please sign in to comment.