Clean check for currentPoiType
This commit is contained in:
parent
dcd05c455f
commit
8503fe766f
1 changed files with 8 additions and 2 deletions
|
@ -172,9 +172,15 @@ public class AdvancedEditPoiFragment extends BaseOsmAndFragment
|
|||
linearLayout.removeAllViews();
|
||||
editPoiData.setIsInEdit(true);
|
||||
PoiType pt = editPoiData.getCurrentPoiType();
|
||||
String currentPoiTypeKey = "";
|
||||
if (pt != null) {
|
||||
currentPoiTypeKey = pt.getEditOsmTag();
|
||||
}
|
||||
for (Entry<String, String> tag : editPoiData.getTagValues().entrySet()) {
|
||||
if (tag.getKey().equals(EditPoiData.POI_TYPE_TAG) || tag.getKey().equals(pt != null ? pt.getEditOsmTag() : null)
|
||||
|| tag.getKey().equals(OSMSettings.OSMTagKey.NAME.getValue()) || tag.getKey().startsWith(EditPoiData.REMOVE_TAG_PREFIX))
|
||||
if (tag.getKey().equals(EditPoiData.POI_TYPE_TAG)
|
||||
|| tag.getKey().equals(OSMSettings.OSMTagKey.NAME.getValue())
|
||||
|| tag.getKey().startsWith(EditPoiData.REMOVE_TAG_PREFIX)
|
||||
|| tag.getKey().equals(currentPoiTypeKey))
|
||||
continue;
|
||||
addTagView(tag.getKey(), tag.getValue());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue