Skip to content
Permalink
Browse files

fixed failure to insert only one point

Previously, if pointsNumber was 1, it wouldn't insert a new point in the middle.
(cherry picked from commit 754ccef)
  • Loading branch information
anitagraser authored and alexbruy committed Aug 10, 2016
1 parent 597cfd3 commit dee03390a8985283cebcf9e06d0b71a3c2f735c0
Showing with 1 addition and 4 deletions.
  1. +1 −4 python/plugins/processing/algs/qgis/DensifyGeometries.py
@@ -112,10 +112,7 @@ def densifyGeometry(self, geometry, pointsNumber, isPolygon):

def densify(self, polyline, pointsNumber):
output = []
if pointsNumber != 1:
multiplier = 1.0 / float(pointsNumber + 1)
else:
multiplier = 1
multiplier = 1.0 / float(pointsNumber + 1)
for i in xrange(len(polyline) - 1):
p1 = polyline[i]
p2 = polyline[i + 1]

0 comments on commit dee0339

Please sign in to comment.
You can’t perform that action at this time.