Fix shorten route calculation

This commit is contained in:
Victor Shcherb 2015-05-06 23:21:28 +02:00
parent 583f58f480
commit ef643006b9

View file

@ -334,7 +334,7 @@ public class RoutePlannerFrontEnd {
runRecalculation = rlist.size() > 0; runRecalculation = rlist.size() > 0;
if (rlist.size() > 0) { if (rlist.size() > 0) {
RouteSegment previous = null; RouteSegment previous = null;
for (int i = 0; i < rlist.size() - 1; i++) { for (int i = 0; i <= rlist.size() - 1; i++) {
RouteSegmentResult rr = rlist.get(i); RouteSegmentResult rr = rlist.get(i);
RouteSegment segment = new RouteSegment(rr.getObject(), rr.getEndPointIndex()); RouteSegment segment = new RouteSegment(rr.getObject(), rr.getEndPointIndex());
if (previous != null) { if (previous != null) {