mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fix index out of range error in shortest path algs
This commit is contained in:
parent
d1d95b1d6f
commit
49254384df
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user