From 13a7e98f6a4bdb10272ecc7873a6bcc7865d9864 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 18 Sep 2011 14:41:29 +0200 Subject: [PATCH] Fix Issue 643: stop routing doens't clear navigation point --- OsmAnd/src/net/osmand/plus/activities/MapActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 39896aa78e..03a513a2a1 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -1027,7 +1027,11 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso return true; case R.id.map_navigate_to_point: if (mapLayers.getNavigationLayer().getPointToNavigate() != null) { - navigateToPoint(null); + if(routingHelper.isRouteCalculated()){ + routingHelper.setFinalAndCurrentLocation(null, routingHelper.getCurrentLocation(), routingHelper.getCurrentGPXRoute()); + } else { + navigateToPoint(null); + } } else { navigateToPoint(new LatLon(mapView.getLatitude(), mapView.getLongitude())); }