Disable empty state for ruler

This commit is contained in:
Alexey Kulish 2017-10-18 20:09:04 +03:00
parent e09acfce48
commit 414a0f0d48
2 changed files with 3 additions and 2 deletions

View file

@ -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()) {

View file

@ -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;
}