From 414a0f0d48adbeded9feb0acf40157aa91596974 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 18 Oct 2017 20:09:04 +0300 Subject: [PATCH] Disable empty state for ruler --- OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java | 3 ++- OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index 4895eaa881..6c397b09d6 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -676,7 +676,8 @@ public class MapControlsLayer extends OsmandMapLayer { public void switchMapControlsVisibility() { if (app.getRoutingHelper().isFollowingMode() || app.getRoutingHelper().isPauseNavigation() || mapActivity.getMeasurementToolFragment() != null - || mapActivity.getPlanRouteFragment() != null) { + || mapActivity.getPlanRouteFragment() != null + || mapActivity.getMapLayers().getRulerControlLayer().rulerModeOn()) { return; } if (isMapControlsVisible()) { diff --git a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java index 583d5d42db..a19bd37a5d 100644 --- a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java @@ -234,7 +234,7 @@ public class RulerControlLayer extends OsmandMapLayer { } } - private boolean rulerModeOn() { + public boolean rulerModeOn() { return mapActivity.getMapLayers().getMapWidgetRegistry().isVisible("ruler") && rightWidgetsPanel.getVisibility() == View.VISIBLE; }