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