From ca1d7dd63016ad6459f82b0fbb0ce66aa3a47e92 Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 11 Jun 2013 22:39:52 +0200 Subject: [PATCH] clean up some 'clear points' code --- OsmAnd/src/net/osmand/plus/TargetPointsHelper.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java index a16ae49e6e..858bde22f5 100644 --- a/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java +++ b/OsmAnd/src/net/osmand/plus/TargetPointsHelper.java @@ -79,12 +79,12 @@ public class TargetPointsHelper { * Clear the local and persistent waypoints list and destination. */ public void removeAllWayPoints(boolean updateRoute){ - settings.clearPointToNavigate(); - pointToNavigate = null; settings.clearIntermediatePoints(); - settings.clearPointToNavigate(); + settings.clearPointToNavigate(); + pointToNavigate = null; intermediatePoints.clear(); - intermediatePointNames.clear(); + intermediatePointNames.clear(); + readFromSettings(settings); updateRouteAndReferesh(updateRoute); } @@ -142,6 +142,8 @@ public class TargetPointsHelper { public void clearPointToNavigate(boolean updateRoute) { settings.clearPointToNavigate(); settings.clearIntermediatePoints(); + intermediatePoints.clear(); + intermediatePointNames.clear(); readFromSettings(settings); updateRouteAndReferesh(updateRoute); }