Fix exiting from modes

This commit is contained in:
PavelRatushny 2017-08-25 13:15:25 +03:00
parent 5e3a87de0e
commit 2f8b0a4b4a

View file

@ -952,7 +952,7 @@ public class MeasurementToolFragment extends Fragment {
} }
private void switchMovePointMode(boolean enable) { private void switchMovePointMode(boolean enable) {
if (editingCtx.isInMovePointMode()) { if (enable) {
toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back); toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back);
} else { } else {
toolBarController.setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark); 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) { private void switchAddPointAfterMode(boolean enable) {
if (editingCtx.isInAddPointAfterMode()) { if (enable) {
toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back); toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back);
} else { } else {
toolBarController.setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark); 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) { private void switchAddPointBeforeMode(boolean enable) {
if (editingCtx.isInAddPointBeforeMode()) { if (enable) {
toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back); toolBarController.setBackBtnIconIds(R.drawable.ic_action_mode_back, R.drawable.ic_action_mode_back);
} else { } else {
toolBarController.setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark); toolBarController.setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark);