Changeset 30662 in osm for applications/editors/josm/plugins/imagery-xml-bounds/src
- Timestamp:
- 2014-09-21T20:16:12+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ComputeBoundsAction.java
r30386 r30662 87 87 // Remove closed ways already inside a selected multipolygon 88 88 for (Iterator<Way> it = closedWays.iterator(); it.hasNext(); ) { 89 Way way = it.next(); 90 for (Relation mp : multipolygons) { 91 for (RelationMember mb : mp.getMembers()) { 92 if (mb.getMember().equals(way)) { 93 it.remove(); 94 } 95 } 96 } 89 processIterator(it); 97 90 } 98 91 // Enable the action if at least one area is found 99 92 setEnabled(!multipolygons.isEmpty() || !closedWays.isEmpty()); 100 93 } 94 95 private void processIterator(Iterator<Way> it) { 96 Way way = it.next(); 97 for (Relation mp : multipolygons) { 98 for (RelationMember mb : mp.getMembers()) { 99 if (mb.getMember().equals(way)) { 100 it.remove(); 101 return; 102 } 103 } 104 } 105 } 101 106 102 107 public final String getXml() {
Note:
See TracChangeset
for help on using the changeset viewer.