Fix #9238
This commit is contained in:
parent
b2118e6865
commit
a56edc2f7a
1 changed files with 6 additions and 1 deletions
|
@ -1463,6 +1463,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();
|
||||||
|
@ -1503,6 +1505,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) {
|
||||||
|
@ -1587,7 +1590,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