From 2f8b0a4b4a08ebc19f5076e337154e369fc02a2d Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Fri, 25 Aug 2017 13:15:25 +0300 Subject: [PATCH] Fix exiting from modes --- .../plus/measurementtool/MeasurementToolFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 8562fc1b9d..1ae0ca7289 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -952,7 +952,7 @@ public class MeasurementToolFragment extends Fragment { } private void switchMovePointMode(boolean enable) { - if (editingCtx.isInMovePointMode()) { + if (enable) { toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back); } else { toolBarController.setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark); @@ -971,7 +971,7 @@ public class MeasurementToolFragment extends Fragment { } private void switchAddPointAfterMode(boolean enable) { - if (editingCtx.isInAddPointAfterMode()) { + if (enable) { toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back); } else { toolBarController.setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark); @@ -990,7 +990,7 @@ public class MeasurementToolFragment extends Fragment { } private void switchAddPointBeforeMode(boolean enable) { - if (editingCtx.isInAddPointBeforeMode()) { + if (enable) { toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back); } else { toolBarController.setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark);