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