Try solve #6646
This commit is contained in:
parent
51611e55c0
commit
3aff521ddc
2 changed files with 9 additions and 7 deletions
|
@ -700,19 +700,19 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
|||
OnClickListener listener = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
if (mapActivity != null) {
|
||||
//MapActivity mapActivity = getMapActivity();
|
||||
//if (mapActivity != null) {
|
||||
if (selected.size() > 0) {
|
||||
OsmandApplication app = mapActivity.getMyApplication();
|
||||
// OsmandApplication app = mapActivity.getMyApplication();
|
||||
ApplicationMode next = selected.iterator().next();
|
||||
if (app.getRoutingHelper().isRouteCalculated()) {
|
||||
app.getSettings().LAST_ROUTE_APPLICATION_MODE.set(next);
|
||||
}
|
||||
// if (app.getRoutingHelper().isRouteCalculated()) {
|
||||
// app.getSettings().LAST_ROUTE_APPLICATION_MODE.set(next);
|
||||
// }
|
||||
updateApplicationMode(am, next);
|
||||
}
|
||||
updateFinishPointView();
|
||||
updateOptionsButtons();
|
||||
}
|
||||
//}
|
||||
}
|
||||
};
|
||||
final List<ApplicationMode> values = new ArrayList<ApplicationMode>(ApplicationMode.values(mapActivity.getMyApplication()));
|
||||
|
|
|
@ -943,6 +943,7 @@ public class RoutingHelper {
|
|||
|
||||
public void recalculateRouteDueToSettingsChange() {
|
||||
clearCurrentRoute(finalLocation, intermediatePoints);
|
||||
getSettings().LAST_ROUTE_APPLICATION_MODE.set(getAppMode());
|
||||
if (isPublicTransportMode()) {
|
||||
Location start = lastFixedLocation;
|
||||
LatLon finish = finalLocation;
|
||||
|
@ -997,6 +998,7 @@ public class RoutingHelper {
|
|||
public void startRouteCalculationThread(RouteCalculationParams params, boolean paramsChanged, boolean updateProgress) {
|
||||
synchronized (this) {
|
||||
final Thread prevRunningJob = currentRunningJob;
|
||||
getSettings().LAST_ROUTE_APPLICATION_MODE.set(getAppMode());
|
||||
RouteRecalculationThread newThread = new RouteRecalculationThread(
|
||||
"Calculating route", params, paramsChanged); //$NON-NLS-1$
|
||||
currentRunningJob = newThread;
|
||||
|
|
Loading…
Reference in a new issue