Fix
This commit is contained in:
parent
16e33aa6b0
commit
502a0807e1
2 changed files with 4 additions and 6 deletions
|
@ -297,6 +297,9 @@ public class AdvancedEditPoiFragment extends Fragment
|
||||||
Set<String> values) {
|
Set<String> values) {
|
||||||
if (abstractPoiType instanceof PoiType) {
|
if (abstractPoiType instanceof PoiType) {
|
||||||
PoiType poiType = (PoiType) abstractPoiType;
|
PoiType poiType = (PoiType) abstractPoiType;
|
||||||
|
if (poiType.isNotEditableOsm()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (poiType.getOsmTag() != null &&
|
if (poiType.getOsmTag() != null &&
|
||||||
!poiType.getOsmTag().equals(OSMSettings.OSMTagKey.NAME.getValue())) {
|
!poiType.getOsmTag().equals(OSMSettings.OSMTagKey.NAME.getValue())) {
|
||||||
stringSet.add(poiType.getOsmTag());
|
stringSet.add(poiType.getOsmTag());
|
||||||
|
@ -355,10 +358,6 @@ public class AdvancedEditPoiFragment extends Fragment
|
||||||
HashSet<String> tagKeys = new HashSet<>();
|
HashSet<String> tagKeys = new HashSet<>();
|
||||||
HashSet<String> valueKeys = new HashSet<>();
|
HashSet<String> valueKeys = new HashSet<>();
|
||||||
for (AbstractPoiType abstractPoiType : result.values()) {
|
for (AbstractPoiType abstractPoiType : result.values()) {
|
||||||
if (abstractPoiType instanceof PoiType &&
|
|
||||||
((PoiType) abstractPoiType).isNotEditableOsm()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
addPoiToStringSet(abstractPoiType, tagKeys, valueKeys);
|
addPoiToStringSet(abstractPoiType, tagKeys, valueKeys);
|
||||||
}
|
}
|
||||||
addPoiToStringSet(mapPoiTypes.getOtherMapCategory(), tagKeys, valueKeys);
|
addPoiToStringSet(mapPoiTypes.getOtherMapCategory(), tagKeys, valueKeys);
|
||||||
|
|
|
@ -170,8 +170,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
||||||
if (selectedObj instanceof Amenity) {
|
if (selectedObj instanceof Amenity) {
|
||||||
Amenity amenity = (Amenity) selectedObj;
|
Amenity amenity = (Amenity) selectedObj;
|
||||||
final PoiType poiType = amenity.getType().getPoiTypeByKeyName(amenity.getSubType());
|
final PoiType poiType = amenity.getType().getPoiTypeByKeyName(amenity.getSubType());
|
||||||
isEditable = !(amenity.getType().isWiki() ||
|
isEditable = !amenity.getType().isWiki() && !poiType.isNotEditableOsm();
|
||||||
poiType.isNotEditableOsm());
|
|
||||||
}
|
}
|
||||||
if (isEditable) {
|
if (isEditable) {
|
||||||
adapter.item(R.string.poi_context_menu_modify).iconColor(R.drawable.ic_action_edit_dark).listen(listener).position(1).reg();
|
adapter.item(R.string.poi_context_menu_modify).iconColor(R.drawable.ic_action_edit_dark).listen(listener).position(1).reg();
|
||||||
|
|
Loading…
Reference in a new issue