Fix bugs
This commit is contained in:
parent
996cac534d
commit
8fc7439ab7
8 changed files with 10 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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() &&
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue