Ignore:
Timestamp:
2015-06-03T13:43:59+02:00 (5 years ago)
Author:
Don-vip
Message:

simplify usage of Way.firstNode()

File:
1 edited

Legend:

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

    r8456 r8460  
    441441            return delete(layer, Collections.singleton(ws.way), false);
    442442
    443         if (ws.way.firstNode() == ws.way.lastNode()) {
    444             // If the way is circular (first and last nodes are the same),
    445             // the way shouldn't be splitted
     443        if (ws.way.isClosed()) {
     444            // If the way is circular (first and last nodes are the same), the way shouldn't be splitted
    446445
    447446            List<Node> n = new ArrayList<>();
     
    456455        }
    457456
    458         List<Node> n1 = new ArrayList<>(), n2 = new ArrayList<>();
     457        List<Node> n1 = new ArrayList<>();
     458        List<Node> n2 = new ArrayList<>();
    459459
    460460        n1.addAll(ws.way.getNodes().subList(0, ws.lowerIndex + 1));
Note: See TracChangeset for help on using the changeset viewer.