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 File toSave;
|
||||
|
||||
private boolean exportRouteAsGpx = false;
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
cancelModes();
|
||||
|
@ -1505,6 +1507,7 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
|
|||
gpx.tracks.add(track);
|
||||
} else if (saveType == SaveType.ROUTE_POINT) {
|
||||
if (editingCtx.isInSnapToRoadMode()) {
|
||||
exportRouteAsGpx = true;
|
||||
editingCtx.exportRouteAsGpx(trackName, new ExportAsGpxListener() {
|
||||
@Override
|
||||
public void onExportAsGpxFinished(GPXFile gpx) {
|
||||
|
@ -1589,7 +1592,9 @@ public class MeasurementToolFragment extends BaseOsmAndFragment {
|
|||
|
||||
@Override
|
||||
protected void onPostExecute(Exception warning) {
|
||||
onGpxSaved(warning);
|
||||
if (!exportRouteAsGpx) {
|
||||
onGpxSaved(warning);
|
||||
}
|
||||
}
|
||||
|
||||
private void onGpxSaved(Exception warning) {
|
||||
|
|
Loading…
Reference in a new issue