This commit is contained in:
Vitaliy 2020-05-13 15:47:31 +03:00
parent 75b8b0de3a
commit b36c80d7ad
2 changed files with 8 additions and 1 deletions

View file

@ -260,6 +260,8 @@ public class AddPointBottomSheetDialog extends MenuBottomSheetDialogFragment {
if (targetPointsHelper.getPointToStart() != null) {
targetPointsHelper.clearStartPoint(true);
app.getSettings().backupPointToStart();
} else {
targetPointsHelper.updateRouteAndRefresh(false);
}
}
} else if (activity != null) {

View file

@ -1017,11 +1017,16 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
}
final OsmandApplication app = mapActivity.getMyApplication();
final RoutingHelper helper = app.getRoutingHelper();
final TargetPointsHelper targetHelper = app.getTargetPointsHelper();
View startButton = mainView.findViewById(R.id.start_button);
TextViewExProgress startButtonText = (TextViewExProgress) mainView.findViewById(R.id.start_button_descr);
ProgressBar progressBar = (ProgressBar) mainView.findViewById(R.id.progress_bar_button);
boolean publicTransportMode = helper.isPublicTransportMode();
boolean routeCalculated = isRouteCalculated();
boolean currentLocationNotFound = OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)
&& targetHelper.getPointToStart() == null && targetHelper.getPointToNavigate() != null;
int iconId = publicTransportMode ? R.drawable.ic_map : R.drawable.ic_action_start_navigation;
int color1;
int color2;
@ -1037,7 +1042,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
}
} else {
color1 = nightMode ? R.color.active_buttons_and_links_text_dark : R.color.active_buttons_and_links_text_light;
if (routeCalculated) {
if (routeCalculated || currentLocationNotFound && !helper.isRouteBeingCalculated()) {
AndroidUtils.setBackground(app, startButton, nightMode, R.color.active_color_primary_light, R.color.active_color_primary_dark);
color2 = color1;
} else {