Fix index out of range error in shortest path algs

This commit is contained in:
Nyall Dawson 2017-10-28 15:24:09 +10:00
parent d1d95b1d6f
commit 49254384df
2 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ class ShortestPathLayerToPoint(QgisAlgorithm):
nPoints = len(snappedPoints)
total = 100.0 / nPoints if nPoints else 1
for i in range(1, nPoints + 1):
for i in range(1, nPoints):
if feedback.isCanceled():
break

View File

@ -238,7 +238,7 @@ class ShortestPathPointToLayer(QgisAlgorithm):
nPoints = len(snappedPoints)
total = 100.0 / nPoints if nPoints else 1
for i in range(1, nPoints + 1):
for i in range(1, nPoints):
if feedback.isCanceled():
break