Changeset 27698 in osm
- Timestamp:
- 2012-02-03T16:49:50+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java
r27645 r27698 198 198 } 199 199 200 if (hasImportantNode( way)) {201 JOptionPane.showMessageDialog(Main.parent, 202 tr("The way to be replaced cannot have any nodes with properties or relation memberships ."),200 if (hasImportantNode(geometry, way)) { 201 JOptionPane.showMessageDialog(Main.parent, 202 tr("The way to be replaced cannot have any nodes with properties or relation memberships unless they belong to both ways."), 203 203 TITLE, JOptionPane.WARNING_MESSAGE); 204 204 return; … … 297 297 * @return 298 298 */ 299 protected boolean hasImportantNode(Way way) {299 protected boolean hasImportantNode(Way geometry, Way way) { 300 300 for (Node n : way.getNodes()) { 301 // if original and replacement way share a node, it's safe to replace 302 if (geometry.containsNode(n)) { 303 continue; 304 } 301 305 //TODO: if way is connected to other ways, warn or disallow? 302 306 for (OsmPrimitive o : n.getReferrers()) {
Note:
See TracChangeset
for help on using the changeset viewer.