From 062c9130ad7aaf6219ee29f6087b5ccf9a519f44 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jul 2014 21:39:23 +0300 Subject: [PATCH 1/2] fixed issue 115 in Jira --- OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index c1b01d7891..e49b96c139 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -793,7 +793,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { // search from end for (int i = category.size() - 1; i >= 0; i--) { String cat = category.get(i); - if (Algorithms.objectEquals(g.subfolder, cat)) { + if (Algorithms.objectEquals(getActivity().getString(R.string.local_indexes_cat_gpx) + " " + g.subfolder, cat)) { found = i; break; } From f14a85d1ed9424696fa81b20ba346afb7cd448ba Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2014 11:44:18 +0300 Subject: [PATCH 2/2] 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);