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/qgis@8088 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 29, 2008
1 parent a6b7f14 commit 2e62254c1d14406eb7ac718b699a8caabe74de79
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 2e62254

Please sign in to comment.