We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2607535 commit e9ff072Copy full SHA for e9ff072
python/plugins/fTools/tools/doSimplify.py
@@ -162,10 +162,18 @@ def restoreGui( self ):
162
def geomVertexCount( geometry ):
163
geomType = geometry.type()
164
if geomType == 1: # line
165
- points = geometry.asPolyline()
+ if geometry.isMultipart():
166
+ pointsList = geometry.asMultiPolyline()
167
+ points=sum(pointsList, [])
168
+ else:
169
+ points = geometry.asPolyline()
170
return len( points )
171
elif geomType == 2: # polygon
- polylines = geometry.asPolygon()
172
173
+ polylinesList = geometry.asMultiPolygon()
174
+ polylines=sum(polylinesList, [])
175
176
+ polylines = geometry.asPolygon()
177
points = []
178
for l in polylines:
179
points.extend( l )
0 commit comments