Added check for exsiting intermediates
This commit is contained in:
parent
f859aee1a3
commit
fd88fd347d
1 changed files with 8 additions and 4 deletions
|
@ -251,11 +251,15 @@ public class PointNavigationLayer extends OsmandMapLayer implements
|
|||
newTargetPoint = targetPointsHelper.getPointToNavigate();
|
||||
} else if (oldPoint.intermediate) {
|
||||
List<TargetPoint> points = targetPointsHelper.getIntermediatePointsWithTarget();
|
||||
int i = points.indexOf(oldPoint);
|
||||
if (i != -1) {
|
||||
newTargetPoint = new TargetPoint(position,
|
||||
new PointDescription(PointDescription.POINT_TYPE_LOCATION, ""));
|
||||
points.set(points.indexOf(oldPoint), newTargetPoint);
|
||||
points.set(i, newTargetPoint);
|
||||
targetPointsHelper.reorderAllTargetPoints(points, true);
|
||||
}
|
||||
|
||||
}
|
||||
result = true;
|
||||
}
|
||||
if (callback != null) {
|
||||
|
|
Loading…
Reference in a new issue