Merge remote-tracking branch 'origin/plan_route_options' into plan_route_options
This commit is contained in:
commit
d1d3129996
1 changed files with 6 additions and 1 deletions
|
@ -1465,6 +1465,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
|
||||||
private ProgressDialog progressDialog;
|
private ProgressDialog progressDialog;
|
||||||
private File toSave;
|
private File toSave;
|
||||||
|
|
||||||
|
private boolean exportRouteAsGpx = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPreExecute() {
|
protected void onPreExecute() {
|
||||||
cancelModes();
|
cancelModes();
|
||||||
|
@ -1505,6 +1507,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
|
||||||
gpx.tracks.add(track);
|
gpx.tracks.add(track);
|
||||||
} else if (saveType == SaveType.ROUTE_POINT) {
|
} else if (saveType == SaveType.ROUTE_POINT) {
|
||||||
if (editingCtx.isInSnapToRoadMode()) {
|
if (editingCtx.isInSnapToRoadMode()) {
|
||||||
|
exportRouteAsGpx = true;
|
||||||
editingCtx.exportRouteAsGpx(trackName, new ExportAsGpxListener() {
|
editingCtx.exportRouteAsGpx(trackName, new ExportAsGpxListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onExportAsGpxFinished(GPXFile gpx) {
|
public void onExportAsGpxFinished(GPXFile gpx) {
|
||||||
|
@ -1589,7 +1592,9 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Exception warning) {
|
protected void onPostExecute(Exception warning) {
|
||||||
onGpxSaved(warning);
|
if (!exportRouteAsGpx) {
|
||||||
|
onGpxSaved(warning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onGpxSaved(Exception warning) {
|
private void onGpxSaved(Exception warning) {
|
||||||
|
|
Loading…
Reference in a new issue