Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 12, 2016
1 parent c2db70b commit 47421b2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python/plugins/processing/algs/qgis/DensifyGeometries.py
Expand Up @@ -108,10 +108,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]
Expand Down

0 comments on commit 47421b2

Please sign in to comment.