From c7d0b0555c280744939eab2c374edeb574d6ccf5 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 16 Feb 2016 13:17:23 +0300 Subject: [PATCH] Clear all waypoints if navigation cancelled --- OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 8ee3b868b1..8c7db4b94b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -778,7 +778,9 @@ public class MapActivityActions implements DialogProvider { routingHelper.setRoutePlanningMode(false); settings.LAST_ROUTING_APPLICATION_MODE = settings.APPLICATION_MODE.get(); settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get()); - //getMyApplication().getTargetPointsHelper().clearStartPoint(false); + if (settings.USE_MAP_MARKERS.get()) { + getMyApplication().getTargetPointsHelper().removeAllWayPoints(false); + } mapActivity.updateApplicationModeSettings(); mapActivity.getDashboard().clearDeletedPoints(); }