Ignore:
Timestamp:
2022-06-14T20:11:21+02:00 (2 years ago)
Author:
taylor.smock
Message:

see #22104: Remove usages of Node#getCoor where possible

This also accounts for cases where Node has the methods used later,
so a new LatLon is unnecessary.

Location:
applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline
Files:
2 edited

Legend:

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

    r35942 r35976  
    137137        mousePos = e.getPoint();
    138138        if (nearestNode != null) {
    139             drawStartPos = MainApplication.getMap().mapView.getPoint(nearestNode.getCoor());
     139            drawStartPos = MainApplication.getMap().mapView.getPoint(nearestNode);
    140140        } else {
    141141            drawStartPos = mousePos;
     
    186186        MapFrame map = MainApplication.getMap();
    187187        if (nearestNode != null)
    188             drawEndPos = map.mapView.getPoint(nearestNode.getCoor());
     188            drawEndPos = map.mapView.getPoint(nearestNode);
    189189        else
    190190            drawEndPos = mousePos;
  • applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/PointAction.java

    r35297 r35976  
    7676        if (e.getButton() == MouseEvent.BUTTON1) {
    7777            if (isCtrlDown) {
    78                 if (pointList.size() > 0) {
     78                if (!pointList.isEmpty()) {
    7979                    pointList.remove(pointList.size() - 1);
    8080                    updateTextEdit();
     
    8888                    return;
    8989                }
    90                 LatLon coor = node.getCoor();
    91                 String point = String.valueOf(coor.getX()) + "," + String.valueOf(coor.getY());
     90                String point = node.lon() + "," + node.lat();
    9291                int maxInstances = parentPlugin.currentCommand.parameters.get(parentPlugin.currentCommand.currentParameterNum).maxInstances;
    9392                if (maxInstances == 1) {
Note: See TracChangeset for help on using the changeset viewer.