From 64e04dbae9c4b7845d62e454c784b6e8274fa6ec Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Wed, 12 Jul 2017 18:08:51 +0300 Subject: [PATCH] Change center icon for second ruler mode --- OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java index 79128ff98c..9046a9184a 100644 --- a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java @@ -160,7 +160,7 @@ public class RulerControlLayer extends OsmandMapLayer { showTwoFingersDistance = !view.isWasZoomInMultiTouch() && !tb.isZoomAnimated() && (view.isMultiTouch() || System.currentTimeMillis() - cacheMultiTouchEndTime < DELAY); - drawCenterIcon(canvas, tb, center, settings.isNightMode()); + drawCenterIcon(canvas, tb, center, settings.isNightMode(), mode); Location currentLoc = app.getLocationProvider().getLastKnownLocation(); if (showDistBetweenFingerAndLocation && currentLoc != null) { float x = tb.getPixXFromLonNoRot(singleTouchPointLatLon.getLongitude()); @@ -215,9 +215,10 @@ public class RulerControlLayer extends OsmandMapLayer { } } - private void drawCenterIcon(Canvas canvas, RotatedTileBox tb, QuadPoint center, boolean nightMode) { + private void drawCenterIcon(Canvas canvas, RotatedTileBox tb, QuadPoint center, boolean nightMode, + RulerMode mode) { canvas.rotate(-tb.getRotate(), center.x, center.y); - if (nightMode) { + if (nightMode || mode == RulerMode.SECOND) { canvas.drawBitmap(centerIconNight, center.x - centerIconNight.getWidth() / 2, center.y - centerIconNight.getHeight() / 2, bitmapPaint); } else {