From f14a85d1ed9424696fa81b20ba346afb7cd448ba Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2014 11:44:18 +0300 Subject: [PATCH] fixed jira bug 100 --- .../src/net/osmand/plus/activities/MapActivityActions.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 32ad27f6b0..afaa01a474 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -615,9 +615,11 @@ public class MapActivityActions implements DialogProvider { private void enterRoutePlanningModeImpl(GPXFile gpxFile, LatLon from, String fromName) { ApplicationMode mode = settings.DEFAULT_APPLICATION_MODE.get(); - if(mode == ApplicationMode.DEFAULT) { - mode = ApplicationMode.CAR; + if (mode == ApplicationMode.DEFAULT) { + ApplicationMode selected = settings.APPLICATION_MODE.get(); + mode = selected == ApplicationMode.DEFAULT ? ApplicationMode.CAR : selected; } + OsmandApplication app = mapActivity.getMyApplication(); TargetPointsHelper targets = app.getTargetPointsHelper(); app.getSettings().APPLICATION_MODE.set(mode);