From 8fc7439ab7402ca88768563777c9c5792c2fe069 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 25 Jun 2014 18:27:13 +0200 Subject: [PATCH] Fix bugs --- OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java | 4 ++-- .../src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java | 2 +- .../src/net/osmand/plus/activities/SelectedGPXFragment.java | 4 ++-- OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java | 2 +- OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java | 2 +- .../plus/routepointsnavigation/RoutePointsActivity.java | 2 +- OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index ab850098cf..6b40ed0c43 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -261,11 +261,11 @@ public class GpxSelectionHelper { return null; } - public void setGpxFileToDisplay(boolean notShowNavigationDialog, GPXFile... gpxs) { + public void setGpxFileToDisplay(GPXFile... gpxs) { // special case for gpx current route for(GPXFile gpx : gpxs) { boolean show = true; - selectGpxFileImpl(gpx, show, notShowNavigationDialog); + selectGpxFileImpl(gpx, show, false); } saveCurrentSelections(); } diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index a093aa5c56..a9d163ce8a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -422,7 +422,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { if (loc != null) { settings.setMapLocationToShow(loc.lat, loc.lon, settings.getLastKnownMapZoom()); e = false; - getMyApplication().getSelectedGpxHelper().setGpxFileToDisplay(false, info.gpx); + getMyApplication().getSelectedGpxHelper().setGpxFileToDisplay(info.gpx); MapActivity.launchMapActivityMoveToTop(getActivity()); } } diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index 90d2e31c40..c679be499c 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -390,7 +390,7 @@ public class MapActivityLayers { locToShow = g.findPointToShow(); } } - getApplication().getSelectedGpxHelper().setGpxFileToDisplay(false, result); + getApplication().getSelectedGpxHelper().setGpxFileToDisplay(result); if(locToShow != null){ mapView.getAnimatedDraggingThread().startMoving(locToShow.lat, locToShow.lon, mapView.getZoom(), true); diff --git a/OsmAnd/src/net/osmand/plus/activities/SelectedGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/SelectedGPXFragment.java index 801f1d0629..fbe09d06a2 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SelectedGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/SelectedGPXFragment.java @@ -139,7 +139,7 @@ public class SelectedGPXFragment extends OsmandExpandableListFragment { if (resId == R.string.show_gpx_route) { OsmandSettings settings = getMyApplication().getSettings(); settings.setMapLocationToShow(gpxDisplayItem.locationStart.lat, gpxDisplayItem.locationStart.lon, - settings.getLastKnownMapZoom(), gpxDisplayItem.name); + settings.getLastKnownMapZoom(), Html.fromHtml(gpxDisplayItem.name).toString()); MapActivity.launchMapActivityMoveToTop(getActivity()); } } @@ -266,7 +266,7 @@ public class SelectedGPXFragment extends OsmandExpandableListFragment { @Override public void onClick(DialogInterface dialog, int which) { if(!vis.isChecked()) { - getMyApplication().getSelectedGpxHelper().selectGpxFile(model.getGpx(), false); + getMyApplication().getSelectedGpxHelper().selectGpxFile(model.getGpx(), false, false); SelectedGPXFragment.this.adapter.setDisplayGroups(selectedGpxHelper.getDisplayGroups()); } else { diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java index b3edd6f497..65b6047bd7 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java @@ -282,7 +282,7 @@ public class GpxImportHelper { } private void showGpxOnMap(final GPXUtilities.GPXFile result) { - application.getSelectedGpxHelper().setGpxFileToDisplay(false, result); + application.getSelectedGpxHelper().setGpxFileToDisplay(result); final GPXUtilities.WptPt moveTo = result.findPointToShow(); if (moveTo != null) { mapView.getAnimatedDraggingThread().startMoving(moveTo.lat, moveTo.lon, mapView.getZoom(), true); diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java index 14f4cca6cf..a946175272 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java @@ -367,7 +367,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer } if(visible && (changed || makeVisible)) { GPXFile selectGPXFile = GPXUtilities.loadGPXFile(app, f); - app.getSelectedGpxHelper().setGpxFileToDisplay(false, selectGPXFile); + app.getSelectedGpxHelper().setGpxFileToDisplay(selectGPXFile); } } catch (JSONException e) { e.printStackTrace(); diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java index eaa6d0d1ea..f258cf0a89 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java @@ -77,7 +77,7 @@ public class RoutePointsActivity extends OsmandListActivity { public boolean processResult(GPXUtilities.GPXFile[] result) { final GPXFile gpx = result[0]; app.getSelectedGpxHelper().clearAllGpxFileToShow(); - app.getSelectedGpxHelper().setGpxFileToDisplay(true, gpx); + app.getSelectedGpxHelper().selectGpxFile(gpx, true, true); plugin.setCurrentRoute(gpx); SelectedRouteGpxFile sgpx = plugin.getCurrentRoute(); if (!sgpx.getCurrentPoints().isEmpty() && diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java index e47db1a68b..f5482e49c5 100644 --- a/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java +++ b/OsmAnd/src/net/osmand/plus/sherpafy/TourViewActivity.java @@ -391,7 +391,7 @@ public class TourViewActivity extends SherlockFragmentActivity { if (gpx != null && gpx.findPointToShow() != null) { WptPt p = gpx.findPointToShow(); getMyApplication().getSettings().setMapLocationToShow(p.lat, p.lon, 16, null); - getMyApplication().getSelectedGpxHelper().setGpxFileToDisplay(false, gpx); + getMyApplication().getSelectedGpxHelper().setGpxFileToDisplay(gpx); } } }