From 6b09a8e33fa975f3c258048461e77743c1df9bbe Mon Sep 17 00:00:00 2001 From: vshcherb Date: Sat, 29 Mar 2014 21:36:04 +0100 Subject: [PATCH] Fix exception traces --- .../src/net/osmand/plus/activities/MapActivityActions.java | 6 ++++-- .../plus/views/controls/MapRoutePreferencesControl.java | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 8f455081d7..f742083b13 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -513,10 +513,12 @@ public class MapActivityActions implements DialogProvider { app.getRoutingHelper().setRoutePlanningMode(true); // reset start point targets.setStartPoint(from, false, fromName); - // then calculate gpx + // then set gpx setGPXRouteParams(gpxFile); + if(from != null) { + targets.updateRoutingHelper(); + } - targets.updateRoutingHelper(); mapActivity.getMapViewTrackingUtilities().switchToRoutePlanningMode(); mapActivity.getMapView().refreshMap(true); if(targets.hasTooLongDistanceToNavigate()) { diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java index 264e29e024..8158dfe59b 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java @@ -274,6 +274,7 @@ public class MapRoutePreferencesControl extends MapControls { private void setupSpinner(View settingsDlg) { final Spinner gpxSpinner = (Spinner) settingsDlg.findViewById(R.id.GPXRouteSpinner); + gpxSpinner.setOnItemSelectedListener(null); updateSpinnerItems(gpxSpinner); gpxSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {