From 2789ab52449ac1bc24835299c16b22b9b826217d Mon Sep 17 00:00:00 2001 From: crimean Date: Sat, 30 Mar 2019 19:46:40 +0300 Subject: [PATCH] Fix #6480 --- OsmAnd/res/values/phrases.xml | 2 ++ OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values/phrases.xml b/OsmAnd/res/values/phrases.xml index 70e5095bdd..85bcd111d4 100644 --- a/OsmAnd/res/values/phrases.xml +++ b/OsmAnd/res/values/phrases.xml @@ -3932,4 +3932,6 @@ 3Б* + Deleted object + diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java index b84e4c277b..8e02df7c76 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapLayer.java @@ -586,7 +586,7 @@ public abstract class OsmandMapLayer { Amenity res = null; for (Amenity amenity : amenities) { Long amenityId = amenity.getId() >> 1; - if (amenityId == id) { + if (amenityId == id && !amenity.isClosed()) { res = amenity; break; } @@ -594,7 +594,7 @@ public abstract class OsmandMapLayer { if (res == null && names != null && names.size() > 0) { for (Amenity amenity : amenities) { for (String name : names) { - if (name.equals(amenity.getName())) { + if (name.equals(amenity.getName()) && !amenity.isClosed()) { res = amenity; break; }