From 9b37143f4a896d1c75c54db1f60f2c525141f069 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 9 Jun 2013 19:36:40 +0200 Subject: [PATCH] fix small bug --- .../net/osmand/plus/activities/MapActivityActions.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index f2dbb8851b..407468fe02 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -806,9 +806,11 @@ public class MapActivityActions implements DialogProvider { IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); // For button-less search UI } else if (standardId == R.string.context_menu_item_destination_point) { - targets.navigateToPoint(new LatLon(latitude, longitude), - true, targets.getIntermediatePoints().size()); - IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); + getMyApplication().getTargetPointsHelper().navigateToPoint(new LatLon(latitude, longitude), true, -1); + // always enable and follow and let calculate it (GPS is not accessible in garage) + if(!routingHelper.isRouteBeingCalculated() && !routingHelper.isRouteCalculated() ) { + getDirections(null, new LatLon(latitude, longitude), true); + } } else if (standardId == R.string.context_menu_item_share_location) { shareLocation(latitude, longitude, mapActivity.getMapView().getZoom()); } else if (standardId == R.string.context_menu_item_add_favorite) {