clean up some 'clear points' code

This commit is contained in:
sonora 2013-06-11 22:39:52 +02:00
parent 70afb5a56d
commit ca1d7dd630

View file

@ -79,12 +79,12 @@ public class TargetPointsHelper {
* Clear the local and persistent waypoints list and destination. * Clear the local and persistent waypoints list and destination.
*/ */
public void removeAllWayPoints(boolean updateRoute){ public void removeAllWayPoints(boolean updateRoute){
settings.clearPointToNavigate();
pointToNavigate = null;
settings.clearIntermediatePoints(); settings.clearIntermediatePoints();
settings.clearPointToNavigate(); settings.clearPointToNavigate();
pointToNavigate = null;
intermediatePoints.clear(); intermediatePoints.clear();
intermediatePointNames.clear(); intermediatePointNames.clear();
readFromSettings(settings);
updateRouteAndReferesh(updateRoute); updateRouteAndReferesh(updateRoute);
} }
@ -142,6 +142,8 @@ public class TargetPointsHelper {
public void clearPointToNavigate(boolean updateRoute) { public void clearPointToNavigate(boolean updateRoute) {
settings.clearPointToNavigate(); settings.clearPointToNavigate();
settings.clearIntermediatePoints(); settings.clearIntermediatePoints();
intermediatePoints.clear();
intermediatePointNames.clear();
readFromSettings(settings); readFromSettings(settings);
updateRouteAndReferesh(updateRoute); updateRouteAndReferesh(updateRoute);
} }