Changeset 6008 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2013-06-15T17:05:30+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #8796 - Extruding a way with 3 or 4 nodes closes unexpectedly (patch by AlfonZ)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r5960 r6008  
    434434        Way wnew = new Way(selectedSegment.way);
    435435        boolean wayWasModified = false;
     436        boolean wayWasSingleSegment = wnew.getNodesCount() == 2;
    436437        int insertionPoint = selectedSegment.lowerIndex + 1;
    437438
     
    473474
    474475        //the way was a single segment, close the way
    475         if (wnew.getNodesCount() == 4) {
     476        if (wayWasSingleSegment) {
    476477            wnew.addNode(selectedSegment.getFirstNode());
    477478            wayWasModified = true;
Note: See TracChangeset for help on using the changeset viewer.