Changeset 29037 in osm
- Timestamp:
- 2012-12-05T00:36:21+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
r29035 r29037 174 174 } 175 175 176 Relation associatedStreet = null; 177 178 // Try to find an associatedStreet relation that could be reused from outline. 179 for (OsmPrimitive p : outline.getReferrers()) { 180 if (p instanceof Relation) { 181 Relation rel = (Relation) p; 182 if ("associatedStreet".equals(rel.get("type"))) { 183 associatedStreet = rel; 184 break; 185 } 186 } 187 } 188 176 189 // If we have a street, try to find an associatedStreet relation that could be reused. 177 Relation associatedStreet = null; 178 if (street != null) { 190 if (associatedStreet == null && street != null) { 179 191 outer:for (OsmPrimitive osm : Main.main.getCurrentDataSet().allNonDeletedPrimitives()) { 180 192 if (!(osm instanceof Relation)) continue; … … 438 450 newAssociatedStreet.addMember(new RelationMember("house", w)); 439 451 } 452 if (deleteOutline) { 453 newAssociatedStreet.removeMembersFor(outline); 454 } 440 455 this.commands.add(new ChangeCommand(associatedStreet, newAssociatedStreet)); 441 456 }
Note:
See TracChangeset
for help on using the changeset viewer.