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.
*/
public void removeAllWayPoints(boolean updateRoute){
settings.clearPointToNavigate();
pointToNavigate = null;
settings.clearIntermediatePoints();
settings.clearPointToNavigate();
pointToNavigate = null;
intermediatePoints.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);
}