From a34142152d0006c7efce071d21f9687834b4f25c Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 3 Dec 2014 14:43:33 +0200 Subject: [PATCH] Fixed bug with Destination multiplies many times on one point --- .../net/osmand/plus/activities/MapActivityActions.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 759ace7432..87988648ff 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -348,12 +348,8 @@ public class MapActivityActions implements DialogProvider { standardId == R.string.context_menu_item_destination_point) { boolean dest = standardId == R.string.context_menu_item_destination_point; String selected = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObjectName(); - String target = null; - if(dest && selected != null){ - target = selected.replaceAll(getString(R.string.context_menu_item_destination_point), ""); - } - targets.navigateToPoint(new LatLon(latitude, longitude), true, - dest ? -1 : targets.getIntermediatePoints().size(), dest? target : selected); + targets.navigateToPoint(new LatLon(latitude, longitude), true, + dest ? -1 : targets.getIntermediatePoints().size(), dest? "" : selected); if(targets.getIntermediatePoints().size() > 0) { openIntermediatePointsDialog(); }