From 55f01adf5905cb77badf7bb0ef2f313853c4e536 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Wed, 25 Jul 2018 12:13:40 +0300 Subject: [PATCH] Fix #5596 --- .../plus/mapcontextmenu/builders/AmenityMenuBuilder.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java index bb34936d69..cdd424b558 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java @@ -344,6 +344,8 @@ public class AmenityMenuBuilder extends MenuBuilder { AmenityInfoRow cuisineRow = null; List collectedPoiTypes = new ArrayList<>(); + boolean osmEditingEnabled = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null; + for (Map.Entry e : amenity.getAdditionalInfo().entrySet()) { int iconId = 0; Drawable icon = null; @@ -351,7 +353,10 @@ public class AmenityMenuBuilder extends MenuBuilder { String key = e.getKey(); String vl = e.getValue(); - if (key.equals("image") || key.equals("mapillary") || key.equals("subway_region")) { + if (key.equals("image") + || key.equals("mapillary") + || key.equals("subway_region") + || (key.equals("note") && !osmEditingEnabled)) { continue; } @@ -632,7 +637,6 @@ public class AmenityMenuBuilder extends MenuBuilder { buildAmenityRow(view, wikiInfo); } - boolean osmEditingEnabled = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null; if (osmEditingEnabled && amenity.getId() != null && amenity.getId() > 0 && (amenity.getId() % 2 == 0 || (amenity.getId() >> 1) < Integer.MAX_VALUE)) {