Changeset 4322 in josm


Ignore:
Timestamp:
2011-08-20T15:37:37+02:00 (13 years ago)
Author:
xeen
Message:

Changeset @4320 could create broken ways with only 1 node. This is a better fix that will delete the way but keep the nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r4320 r4322  
    388388
    389389    public static Command deleteWaySegment(OsmDataLayer layer, WaySegment ws) {
     390        if (ws.way.getNodesCount() < 3)
     391            return delete(layer, Collections.singleton(ws.way), false);
     392
    390393        if (ws.way.firstNode() == ws.way.lastNode()) {
    391394            // If the way is circular (first and last nodes are the same),
Note: See TracChangeset for help on using the changeset viewer.