Changeset 14837 in josm for trunk/src


Ignore:
Timestamp:
2019-03-05T16:08:20+01:00 (6 years ago)
Author:
GerdP
Message:

simplify code and avoid use of CopyList constructor

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r14734 r14837  
    15171517            maxWaySegLenSq *= maxWaySegLenSq;
    15181518
    1519             Point2D wp1 = getPoint2D(ws.way.getNode(ws.lowerIndex));
    1520             Point2D wp2 = getPoint2D(ws.way.getNode(ws.lowerIndex+1));
     1519            Point2D wp1 = getPoint2D(ws.getFirstNode());
     1520            Point2D wp2 = getPoint2D(ws.getSecondNode());
    15211521
    15221522            // is wayseg shorter than maxWaySegLenSq and
  • trunk/src/org/openstreetmap/josm/gui/layer/validation/PaintVisitor.java

    r12823 r14837  
    209209        if (ws.lowerIndex < 0 || ws.lowerIndex + 1 >= ws.way.getNodesCount())
    210210            return;
    211         Node a = ws.way.getNodes().get(ws.lowerIndex);
    212         Node b = ws.way.getNodes().get(ws.lowerIndex + 1);
    213         drawSegment(a, b, color);
     211        drawSegment(ws.getFirstNode(), ws.getSecondNode(), color);
    214212    }
    215213
Note: See TracChangeset for help on using the changeset viewer.