Merge pull request #10660 from osmandapp/fix_osm_edits_checkbox

Fix #10565
This commit is contained in:
vshcherb 2021-01-25 17:34:03 +01:00 committed by GitHub
commit f25ae169a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -111,14 +111,14 @@ public class OpenstreetmapPoint extends OsmPoint {
boolean res = this.getName() != null && this.getName().equals(otherPoint.getName());
LatLon thisLatLon = new LatLon(this.getLatitude(), this.getLongitude());
LatLon otherLatLon = new LatLon(otherPoint.getLatitude(), otherPoint.getLongitude());
res = res || thisLatLon.equals(otherLatLon);
res = res && thisLatLon.equals(otherLatLon);
if (getType() != null)
res = res || getType().equals(otherPoint.getType());
res = res && getType().equals(otherPoint.getType());
if (getSubtype() != null)
res = res || getSubtype().equals(otherPoint.getSubtype());
res = res && getSubtype().equals(otherPoint.getSubtype());
if (getTagsString() != null)
res = res || getTagsString().equals(otherPoint.getTagsString());
res = res || getId() == otherPoint.getId();
res = res && getTagsString().equals(otherPoint.getTagsString());
res = res && getId() == otherPoint.getId();
return res;
}

View file

@ -79,7 +79,9 @@ public class OsmNotesPoint extends OsmPoint {
LatLon thisPos = new LatLon(latitude, longitude);
LatLon thatPos = new LatLon(that.latitude, that.longitude);
boolean res = thisPos.equals(thatPos);
res = res || text != null && text.equals(that.text);
if (text != null) {
res = res && text.equals(that.text);
}
return res;
}