From 8499f4f9881e8be342c620aa46995a06df795397 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 18 Sep 2020 17:29:33 +0300 Subject: [PATCH] Fix icon after gpx approximation --- .../osmand/plus/measurementtool/MeasurementToolFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 7b823edb30..6a36eba3cc 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -138,6 +138,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route private boolean pointsListOpened; private boolean planRouteMode = false; private boolean directionMode = false; + private boolean approximationApplied = false; private boolean portrait; private boolean nightMode; private int cachedMapPosition; @@ -1125,7 +1126,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route final ApplicationMode appMode = editingCtx.getAppMode(); if (mapActivity != null) { Drawable icon; - if (editingCtx.isTrackSnappedToRoad() || editingCtx.isNewData()) { + if (editingCtx.isTrackSnappedToRoad() || editingCtx.isNewData() || approximationApplied) { if (appMode == MeasurementEditingContext.DEFAULT_APP_MODE) { icon = getActiveIcon(R.drawable.ic_action_split_interval); } else { @@ -2004,8 +2005,10 @@ public class MeasurementToolFragment extends BaseOsmAndFragment implements Route @Override public void onApplyGpxApproximation() { + approximationApplied = true; exitApproximationMode(); doAddOrMovePointCommonStuff(); + updateSnapToRoadControls(); if (directionMode) { directionMode = false; MapActivity mapActivity = getMapActivity();