Changeset 35210 in osm for applications/editors/josm/plugins
- Timestamp:
- 2019-11-02T15:27:37+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/PointAction.java
r34574 r35210 72 72 } 73 73 74 @Override public void mousePressed(MouseEvent e) { 74 @Override 75 public void mousePressed(MouseEvent e) { 75 76 if (e.getButton() == MouseEvent.BUTTON1) { 76 77 if (isCtrlDown) { … … 80 81 } 81 82 } else { 82 LatLon coor; 83 if (nearestNode == null) 84 coor = MainApplication.getMap().mapView.getLatLon(e.getX(), e.getY()); 85 else 86 coor = nearestNode.getCoor(); 87 if (coor.isOutSideWorld()) { 83 Node node = nearestNode; 84 if (node == null) 85 node = new Node(MainApplication.getMap().mapView.getEastNorth(e.getX(), e.getY())); 86 if (node.isOutSideWorld()) { 88 87 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Can not draw outside of the world.")); 89 88 return; 90 89 } 90 LatLon coor = node.getCoor(); 91 91 String point = String.valueOf(coor.getX()) + "," + String.valueOf(coor.getY()); 92 92 int maxInstances = parentPlugin.currentCommand.parameters.get(parentPlugin.currentCommand.currentParameterNum).maxInstances;
Note:
See TracChangeset
for help on using the changeset viewer.