diff --git a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java index 3df649ea2b..5b9158ef1b 100644 --- a/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java +++ b/OsmAnd/src/net/osmand/plus/views/AnimateDraggingMapThread.java @@ -40,6 +40,7 @@ public class AnimateDraggingMapThread { private double targetFloatZoom = 0; private boolean isAnimatingZoom; + private boolean isAnimatingMapMove; public AnimateDraggingMapThread(OsmandMapTileView tileView) { this.tileView = tileView; @@ -158,6 +159,7 @@ public class AnimateDraggingMapThread { @Override public void run() { + isAnimatingMapMove = true; setTargetValues(zoom, zoomFP, finalLat, finalLon); boolean animateZoom = finalZoom != null && (zoom != startZoom || startZoomFP != 0); @@ -171,6 +173,7 @@ public class AnimateDraggingMapThread { } animatingMoveInThread(mMoveX, mMoveY, NAV_ANIMATION_TIME, notifyListener, null); + isAnimatingMapMove = false; } }); } @@ -217,6 +220,7 @@ public class AnimateDraggingMapThread { @Override public void run() { + isAnimatingMapMove = true; setTargetValues(endZoom, 0, finalLat, finalLon); if (moveZoom != startZoom) { @@ -243,6 +247,7 @@ public class AnimateDraggingMapThread { tileView.setFractionalZoom(endZoom, 0, notifyListener); pendingRotateAnimation(); + isAnimatingMapMove = false; } }); } @@ -373,6 +378,10 @@ public class AnimateDraggingMapThread { return isAnimatingZoom; } + public boolean isAnimatingMapMove() { + return isAnimatingMapMove; + } + public void startZooming(final int zoomEnd, final double zoomPart, final boolean notifyListener) { boolean doNotUseAnimations = tileView.getSettings().DO_NOT_USE_ANIMATIONS.get(); final float animationTime = doNotUseAnimations ? 0 : ZOOM_ANIMATION_TIME; diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index ad1a8bb190..71894cae60 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -727,6 +727,10 @@ public class OsmandMapTileView implements IMapDownloaderCallback { return animatedDraggingThread.isAnimatingZoom(); } + public boolean isAnimatingMapMove() { + return animatedDraggingThread.isAnimatingMapMove(); + } + @SuppressLint("WrongCall") public void drawOverMap(Canvas canvas, RotatedTileBox tileBox, DrawSettings drawSettings) { if (mapRenderer == null) { diff --git a/OsmAnd/src/net/osmand/plus/views/layers/DownloadedRegionsLayer.java b/OsmAnd/src/net/osmand/plus/views/layers/DownloadedRegionsLayer.java index cd6ba10dd4..2993a90fef 100644 --- a/OsmAnd/src/net/osmand/plus/views/layers/DownloadedRegionsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/layers/DownloadedRegionsLayer.java @@ -253,7 +253,9 @@ public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMe lastCheckMapZoom = zoom; if (app.getSettings().SHOW_DOWNLOAD_MAP_DIALOG.get() - && zoom >= ZOOM_MIN_TO_SHOW_DOWNLOAD_DIALOG && zoom <= ZOOM_MAX_TO_SHOW_DOWNLOAD_DIALOG + && zoom >= ZOOM_MIN_TO_SHOW_DOWNLOAD_DIALOG + && zoom <= ZOOM_MAX_TO_SHOW_DOWNLOAD_DIALOG + && !view.isAnimatingMapMove() && currentObjects != null) { Map selectedObjects = new LinkedHashMap<>();