From b002b005cbec87819aeba52f1fb07732132efd91 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Thu, 13 Sep 2018 10:54:32 +0300 Subject: [PATCH] Fix #5913 --- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 82503fb3c2..46f31522d7 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -665,8 +665,14 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex gpxFile.updateWptPt(objectInMotion, position.getLatitude(), position.getLongitude(), System.currentTimeMillis(), objectInMotion.desc, objectInMotion.name, objectInMotion.category, objectInMotion.getColor()); - new SaveGpxFileAsyncTask(view.getApplication(), callback, objectInMotion).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, gpxFile); syncGpx(gpxFile); + if (gpxFile.showCurrentTrack) { + if (callback != null) { + callback.onApplyMovedObject(true, objectInMotion); + } + } else { + new SaveGpxFileAsyncTask(view.getApplication(), callback, objectInMotion).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, gpxFile); + } } else if (callback != null) { callback.onApplyMovedObject(false, o); }