This commit is contained in:
Victor Shcherb 2015-11-11 17:24:16 +01:00
parent 16e33aa6b0
commit 502a0807e1
2 changed files with 4 additions and 6 deletions

View file

@ -297,6 +297,9 @@ public class AdvancedEditPoiFragment extends Fragment
Set<String> 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<String> tagKeys = new HashSet<>();
HashSet<String> 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);

View file

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