From a7fd0a832c0e7632cf66a34d8686ad78e7347dd8 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Mon, 16 May 2016 16:46:45 +0300 Subject: [PATCH] Moving navigation finish finalized. --- OsmAnd/src/net/osmand/plus/TargetPointsHelper.java | 4 ---- OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java index 8c977930f8..7af0878838 100644 --- a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java +++ b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java @@ -89,10 +89,6 @@ public class TargetPointsHelper { return null; } - public void setLocation(LatLon location) { - point = location; - } - public double getLatitude() { return point.getLatitude(); } diff --git a/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java index 9505636f04..3d105e82eb 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointNavigationLayer.java @@ -260,7 +260,8 @@ public class PointNavigationLayer extends OsmandMapLayer implements @Override public boolean isObjectMovable(Object o) { - return o instanceof TargetPoint; + TargetPointsHelper targetPoints = map.getMyApplication().getTargetPointsHelper(); + return o == targetPoints.getPointToNavigate(); } @Override @@ -270,8 +271,7 @@ public class PointNavigationLayer extends OsmandMapLayer implements if (o instanceof TargetPoint) { TargetPoint point = (TargetPoint) o; TargetPointsHelper tph = map.getMyApplication().getTargetPointsHelper(); - tph.removeWayPoint(false, point.index); - tph.navigateToPoint(position, true, point.index, point.getPointDescription(map)); + tph.navigateToPoint(position, true, -1, point.getPointDescription(map)); result = true; } if (callback != null) {