diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java index 69d97b9c3c..b9825a7785 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/PlanRouteFragment.java @@ -408,9 +408,13 @@ public class PlanRouteFragment extends Fragment implements OsmAndLocationListene @Override public void onApplicationModeItemClick(ApplicationMode mode) { if (planRouteContext.getSnappedMode() != mode) { + boolean defaultMode = mode == ApplicationMode.DEFAULT; MapMarkersLayer layer = getMapMarkersLayer(); if (layer != null) { - layer.setDefaultAppMode(mode == ApplicationMode.DEFAULT); + layer.setDefaultAppMode(defaultMode); + } + if (defaultMode) { + planRouteContext.cancelSnapToRoad(); } planRouteContext.getSnappedToRoadPoints().clear(); planRouteContext.setSnappedMode(mode); @@ -731,6 +735,7 @@ public class PlanRouteFragment extends Fragment implements OsmAndLocationListene MapActivity mapActivity = getMapActivity(); if (mapActivity != null) { mapActivity.getMapLayers().getMapMarkersLayer().setRoute(planRouteContext.getSnapTrkSegment()); + mapActivity.refreshMap(); if (adjustMap) { showRouteOnMap(planRouteContext.getSnapTrkSegment().points); }