Ignore:
Timestamp:
2022-06-15T20:10:48+02:00 (3 years ago)
Author:
taylor.smock
Message:

See #22115: Extract methods from LatLon into ILatLon where they are generally applicable

This uses the extracted methods where possible, and removes unnecessary
Node#getCoor calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/LengthAction.java

    r35976 r35978  
    2020import org.openstreetmap.josm.actions.mapmode.MapMode;
    2121import org.openstreetmap.josm.data.Bounds;
     22import org.openstreetmap.josm.data.coor.ILatLon;
    2223import org.openstreetmap.josm.data.coor.LatLon;
    2324import org.openstreetmap.josm.data.osm.Node;
     
    149150
    150151    private void drawingFinish() {
    151         parentPlugin.loadParameter(String.valueOf(startCoor.greatCircleDistance(endCoor)), true);
     152        parentPlugin.loadParameter(String.valueOf(startCoor.greatCircleDistance((ILatLon) endCoor)), true);
    152153        drawStartPos = null;
    153154        drawing = false;
     
    191192        endCoor = map.mapView.getLatLon(drawEndPos.x, drawEndPos.y);
    192193        if (drawing) {
    193             map.statusLine.setDist(startCoor.greatCircleDistance(endCoor));
     194            map.statusLine.setDist(startCoor.greatCircleDistance((ILatLon) endCoor));
    194195            map.mapView.repaint();
    195196        }
Note: See TracChangeset for help on using the changeset viewer.