Skip to content

Commit

Permalink
[Geometry checker] Fix incorrect ring index in QgsGeometrySelfInterse…
Browse files Browse the repository at this point in the history
…ctionCheck::fixError
  • Loading branch information
manisandro committed Oct 23, 2017
1 parent 737d513 commit 5b2297f
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -179,7 +179,7 @@ void QgsGeometrySelfIntersectionCheck::fixError( QgsGeometryCheckError *error, i
if ( dynamic_cast<QgsCurvePolygon *>( part ) )
{
QgsCurvePolygon *poly = static_cast<QgsCurvePolygon *>( part );
// If ring is interior ring, create separate holes
// If self-intersecting ring is an interior ring, create separate holes
if ( vidx.ring > 0 )
{
poly->removeInteriorRing( vidx.ring );
Expand Down Expand Up @@ -213,7 +213,7 @@ void QgsGeometrySelfIntersectionCheck::fixError( QgsGeometryCheckError *error, i
// No point in adding ChangeAdded changes, since the entire poly2 is added anyways later on
}
poly->removeInteriorRing( i );
changes[error->layerId()][feature.id()].append( Change( ChangeRing, ChangeRemoved, QgsVertexId( vidx.part, i ) ) );
changes[error->layerId()][feature.id()].append( Change( ChangeRing, ChangeRemoved, QgsVertexId( vidx.part, 1 + i ) ) );
}
}

Expand Down

0 comments on commit 5b2297f

Please sign in to comment.