Fix - remove waypoints after restart
This commit is contained in:
parent
ab89f89356
commit
19297a7bd0
2 changed files with 7 additions and 0 deletions
|
@ -250,6 +250,10 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents,
|
|||
if (settings.FOLLOW_THE_ROUTE.get() && !app.getRoutingHelper().isRouteCalculated()
|
||||
&& !app.getRoutingHelper().isRouteBeingCalculated()) {
|
||||
FailSafeFuntions.restoreRoutingMode(this);
|
||||
} else if (app.getSettings().USE_MAP_MARKERS.get()
|
||||
&& !app.getRoutingHelper().isRoutePlanningMode() && app.getTargetPointsHelper().getAllPoints().size() > 0) {
|
||||
app.getRoutingHelper().clearCurrentRoute(null, new ArrayList<LatLon>());
|
||||
app.getTargetPointsHelper().removeAllWayPoints(false);
|
||||
}
|
||||
|
||||
if (!settings.isLastKnownMapLocation()) {
|
||||
|
|
|
@ -183,6 +183,9 @@ public class FailSafeFuntions {
|
|||
private static void notRestoreRoutingMode(MapActivity ma, OsmandApplication app){
|
||||
ma.updateApplicationModeSettings();
|
||||
app.getRoutingHelper().clearCurrentRoute(null, new ArrayList<LatLon>());
|
||||
if (app.getSettings().USE_MAP_MARKERS.get()) {
|
||||
app.getTargetPointsHelper().removeAllWayPoints(false);
|
||||
}
|
||||
ma.refreshMap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue