diff --git a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java index 644150fffd..52302e9b22 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/AdvancedEditPoiFragment.java @@ -297,6 +297,9 @@ public class AdvancedEditPoiFragment extends Fragment Set values) { if (abstractPoiType instanceof PoiType) { PoiType poiType = (PoiType) abstractPoiType; + if (poiType.isNotEditableOsm()) { + return; + } if (poiType.getOsmTag() != null && !poiType.getOsmTag().equals(OSMSettings.OSMTagKey.NAME.getValue())) { stringSet.add(poiType.getOsmTag()); @@ -355,10 +358,6 @@ public class AdvancedEditPoiFragment extends Fragment HashSet tagKeys = new HashSet<>(); HashSet valueKeys = new HashSet<>(); for (AbstractPoiType abstractPoiType : result.values()) { - if (abstractPoiType instanceof PoiType && - ((PoiType) abstractPoiType).isNotEditableOsm()) { - continue; - } addPoiToStringSet(abstractPoiType, tagKeys, valueKeys); } addPoiToStringSet(mapPoiTypes.getOtherMapCategory(), tagKeys, valueKeys); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index b90efd6765..50f24d72b8 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -170,8 +170,7 @@ public class OsmEditingPlugin extends OsmandPlugin { if (selectedObj instanceof Amenity) { Amenity amenity = (Amenity) selectedObj; final PoiType poiType = amenity.getType().getPoiTypeByKeyName(amenity.getSubType()); - isEditable = !(amenity.getType().isWiki() || - poiType.isNotEditableOsm()); + isEditable = !amenity.getType().isWiki() && !poiType.isNotEditableOsm(); } if (isEditable) { adapter.item(R.string.poi_context_menu_modify).iconColor(R.drawable.ic_action_edit_dark).listen(listener).position(1).reg();