We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66c7d68 commit 6f7ad82Copy full SHA for 6f7ad82
src/app/nodetool/qgsnodetool.cpp
@@ -126,11 +126,8 @@ static QgsGeometry geometryToMultiPoint( const QgsGeometry &geom )
126
{
127
QgsMultiPoint *multiPoint = new QgsMultiPoint();
128
QgsGeometry outputGeom( multiPoint );
129
- const QgsAbstractGeometry *g = geom.constGet();
130
- for ( int i = 0; i < g->partCount(); ++i )
131
- for ( int j = 0; j < g->ringCount( i ); ++j )
132
- for ( int k = 0; k < g->vertexCount( i, j ); ++k )
133
- multiPoint->addGeometry( new QgsPoint( g->vertexAt( QgsVertexId( i, j, k ) ) ) );
+ for ( auto pointIt = geom.vertices_begin(); pointIt != geom.vertices_end(); ++pointIt )
+ multiPoint->addGeometry( ( *pointIt ).clone() );
134
return outputGeom;
135
}
136
0 commit comments