Changeset 12778 in josm for trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
- Timestamp:
- 2017-09-08T01:04:05+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r12726 r12778 19 19 import java.util.TreeSet; 20 20 21 import org.openstreetmap.josm.Main; 21 22 import org.openstreetmap.josm.command.ChangeCommand; 22 23 import org.openstreetmap.josm.command.Command; … … 29 30 import org.openstreetmap.josm.data.osm.Way; 30 31 import org.openstreetmap.josm.data.osm.WaySegment; 31 import org.openstreetmap.josm.data.projection.Projections;32 32 import org.openstreetmap.josm.gui.MainApplication; 33 33 import org.openstreetmap.josm.gui.MapView; … … 138 138 if (joinWayToNode) { 139 139 for (Node node : nodesInSegment) { 140 EastNorth newPosition = Geometry.closestPointToSegment(w.getNode(segmentIndex).getEastNorth(), 141 w.getNode(segmentIndex+1).getEastNorth(), 142 node.getEastNorth()); 143 MoveCommand c = new MoveCommand(node, Projections.inverseProject(newPosition)); 140 EastNorth newPosition = Geometry.closestPointToSegment( 141 w.getNode(segmentIndex).getEastNorth(), 142 w.getNode(segmentIndex+1).getEastNorth(), 143 node.getEastNorth()); 144 MoveCommand c = new MoveCommand( 145 node, Main.getProjection().eastNorth2latlon(newPosition)); 144 146 // Avoid moving a given node several times at the same position in case of overlapping ways 145 147 if (!cmds.contains(c)) {
Note:
See TracChangeset
for help on using the changeset viewer.