From 379f60d687fe142fb7d7a8896e337c46f7591026 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 10 Aug 2013 20:14:05 +0200 Subject: [PATCH] Introduce additional menu item for set destnation --- .../src/net/osmand/plus/activities/MapActivityActions.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 6893391487..47c2d9e75b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -905,6 +905,8 @@ public class MapActivityActions implements DialogProvider { final TargetPointsHelper targets = getMyApplication().getTargetPointsHelper(); final OsmandSettings settings = getMyApplication().getSettings(); if(targets.getPointToNavigate() != null) { + adapter.item(R.string.context_menu_item_destination_point).icons(R.drawable.ic_action_flag_dark, + R.drawable.ic_action_flag_light).reg(); adapter.item(R.string.context_menu_item_intermediate_point).icons(R.drawable.ic_action_flage_dark, R.drawable.ic_action_flage_light).reg(); // For button-less search UI @@ -974,7 +976,9 @@ public class MapActivityActions implements DialogProvider { } targets.navigateToPoint(new LatLon(latitude, longitude), true, dest ? -1 : targets.getIntermediatePoints().size(), selected); - IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); + if(targets.getIntermediatePoints().size() > 0) { + IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); + } } 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) {