Fix crash
This commit is contained in:
parent
b81cfec13c
commit
90566c4fbd
1 changed files with 10 additions and 1 deletions
|
@ -872,7 +872,7 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
private void cancelModes() {
|
private void cancelModes() {
|
||||||
if (editingCtx.getOriginalPointToMove() != null) {
|
if (editingCtx.getOriginalPointToMove() != null) {
|
||||||
cancelMovePointMode();
|
cancelMovePointMode();
|
||||||
} else if (editingCtx.getSelectedPointPosition() != -1) {
|
} else if (!isSelectedPointMenuOpened() && editingCtx.getSelectedPointPosition() != -1) {
|
||||||
cancelAddPointBeforeOrAfterMode();
|
cancelAddPointBeforeOrAfterMode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1477,6 +1477,15 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isSelectedPointMenuOpened() {
|
||||||
|
MapActivity mapActivity = getMapActivity();
|
||||||
|
if (mapActivity != null) {
|
||||||
|
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(SelectedPointBottomSheetDialogFragment.TAG);
|
||||||
|
return fragment != null;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean showInstance(FragmentManager fragmentManager, MeasurementEditingContext editingCtx) {
|
public static boolean showInstance(FragmentManager fragmentManager, MeasurementEditingContext editingCtx) {
|
||||||
try {
|
try {
|
||||||
MeasurementToolFragment fragment = new MeasurementToolFragment();
|
MeasurementToolFragment fragment = new MeasurementToolFragment();
|
||||||
|
|
Loading…
Reference in a new issue