diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 3b2dede705..da4a3e5630 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -334,10 +334,6 @@ public class OsmandMapTileView implements IMapDownloaderCallback { return wasZoomInMultiTouch; } - public void setWasZoomInMultiTouch(boolean wasZoomInMultiTouch) { - this.wasZoomInMultiTouch = wasZoomInMultiTouch; - } - public boolean mapGestureAllowed(OsmandMapLayer.MapGestureType type) { for (OsmandMapLayer layer : layers) { if (!layer.isMapGestureAllowed(type)) { @@ -1128,6 +1124,9 @@ public class OsmandMapTileView implements IMapDownloaderCallback { float calcRotate = calc.getRotate() + angle; calc.setRotate(calcRotate); calc.setZoomAndAnimation(initialViewport.getZoom(), dz, initialViewport.getZoomFloatPart()); + if (multiTouch) { + wasZoomInMultiTouch = true; + } final QuadPoint cp = initialViewport.getCenterPixelPoint(); // Keep zoom center fixed or flexible diff --git a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java index 03a789817b..0048d979a6 100644 --- a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java @@ -153,14 +153,11 @@ public class RulerControlLayer extends OsmandMapLayer { if (view.isMultiTouch()) { showDistBetweenFingerAndLocation = false; - if (view.isZooming()) { - view.setWasZoomInMultiTouch(true); - } } else if (cacheMultiTouchEndTime != view.getMultiTouchEndTime()) { cacheMultiTouchEndTime = view.getMultiTouchEndTime(); refreshMapDelayed(); } - showTwoFingersDistance = !view.isWasZoomInMultiTouch() && !view.isZooming() && + showTwoFingersDistance = !view.isWasZoomInMultiTouch() && !tb.isZoomAnimated() && (view.isMultiTouch() || System.currentTimeMillis() - cacheMultiTouchEndTime < DELAY); Location currentLoc = app.getLocationProvider().getLastKnownLocation(); @@ -307,7 +304,7 @@ public class RulerControlLayer extends OsmandMapLayer { private void drawCircle(Canvas canvas, RotatedTileBox tb, int circleNumber, QuadPoint center, RenderingLineAttributes attrs) { - if (!mapActivity.getMapView().isZooming()) { + if (!tb.isZoomAnimated()) { Rect bounds = new Rect(); String text = cacheDistances.get(circleNumber - 1); attrs.paint2.getTextBounds(text, 0, text.length(), bounds);