Fix route between point dialog straight line

This commit is contained in:
Dima-1 2020-08-07 17:51:00 +03:00
parent f94c24bb20
commit e02d982afa

View file

@ -101,13 +101,14 @@ public class RouteBetweenPointsBottomSheetDialogFragment extends BottomSheetDial
@Override @Override
public void onClick(View view) { public void onClick(View view) {
snapToRoadEnabled = false; snapToRoadEnabled = false;
ApplicationMode mode = null;
if ((int) view.getTag() != STRAIGHT_LINE_TAG) { if ((int) view.getTag() != STRAIGHT_LINE_TAG) {
ApplicationMode mode = modes.get((int) view.getTag()); mode = modes.get((int) view.getTag());
snapToRoadEnabled = true; snapToRoadEnabled = true;
Fragment fragment = getTargetFragment(); }
if (fragment instanceof RouteBetweenPointsFragmentListener) { Fragment fragment = getTargetFragment();
((RouteBetweenPointsFragmentListener) fragment).onChangeApplicationMode(mode); if (fragment instanceof RouteBetweenPointsFragmentListener) {
} ((RouteBetweenPointsFragmentListener) fragment).onChangeApplicationMode(mode);
} }
dismiss(); dismiss();
} }