fix show straightline and brouter as navigation types

This commit is contained in:
madwasp79 2019-06-25 17:25:43 +03:00
parent 32e0c5e774
commit 743d1b3ec0

View file

@ -215,9 +215,13 @@ public class EditProfileFragment extends BaseOsmAndFragment {
typeSelectionBtn.setClickable(false); typeSelectionBtn.setClickable(false);
} }
if (!Algorithms.isEmpty(mode.getRoutingProfile())) { if (!Algorithms.isEmpty(mode.getRoutingProfile()) || mode.getRouteService() != RouteService.OSMAND) {
for (RoutingProfileDataObject r : routingProfileDataObjects) { for (RoutingProfileDataObject r : routingProfileDataObjects) {
if (mode.getRoutingProfile().equals(r.getStringKey())) { if (mode.getRoutingProfile() != null && mode.getRoutingProfile().equals(r.getStringKey())
|| (mode.getRouteService() == RouteService.BROUTER
&& r.getStringKey().equals(RoutingProfilesResources.BROUTER_MODE.name()))
|| (mode.getRouteService() == RouteService.STRAIGHT
&& r.getStringKey().equals(RoutingProfilesResources.STRAIGHT_LINE_MODE.name()))) {
profile.routingProfileDataObject = r; profile.routingProfileDataObject = r;
r.setSelected(true); r.setSelected(true);
navTypeEt.setText(r.getName()); navTypeEt.setText(r.getName());