clean up some 'clear points' code
This commit is contained in:
parent
70afb5a56d
commit
ca1d7dd630
1 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue