Skip to content
Permalink
Browse files
Fix return value of addTopologicalPoints(QgsGeometry)
  • Loading branch information
gacarrillor authored and nyalldawson committed Aug 17, 2021
1 parent ce9eef8 commit 5173b6f5351d3f91bcc15d09c6758fc188e80fb8
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/qgsvectorlayereditutils.cpp
@@ -543,19 +543,19 @@ int QgsVectorLayerEditUtils::addTopologicalPoints( const QgsGeometry &geom )
return 1;
}

int returnVal = 0;
bool pointsAdded = false;

QgsAbstractGeometry::vertex_iterator it = geom.vertices_begin();
while ( it != geom.vertices_end() )
{
if ( addTopologicalPoints( *it ) != 0 )
if ( addTopologicalPoints( *it ) == 0 )
{
returnVal = 2;
pointsAdded = true;
}
++it;
}

return returnVal;
return pointsAdded ? 0 : 2;
}

int QgsVectorLayerEditUtils::addTopologicalPoints( const QgsPoint &p )

0 comments on commit 5173b6f

Please sign in to comment.