Changeset 1636 in josm for trunk/src/org/openstreetmap/josm/command/MoveCommand.java
- Timestamp:
- 2009-06-06T13:38:32+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/MoveCommand.java
r1169 r1636 15 15 import javax.swing.tree.MutableTreeNode; 16 16 17 import org.openstreetmap.josm.Main;18 17 import org.openstreetmap.josm.data.coor.EastNorth; 19 18 import org.openstreetmap.josm.data.coor.LatLon; … … 88 87 public void moveAgain(double x, double y) { 89 88 for (Node n : objects) { 90 n.eastNorth = new EastNorth(n.eastNorth.east()+x, n.eastNorth.north()+y); 91 n.coor = Main.proj.eastNorth2latlon(n.eastNorth); 89 n.setEastNorth(n.eastNorth.add(x, y)); 92 90 } 93 91 this.x += x; … … 97 95 @Override public boolean executeCommand() { 98 96 for (Node n : objects) { 99 n.eastNorth = new EastNorth(n.eastNorth.east()+x, n.eastNorth.north()+y); 100 n.coor = Main.proj.eastNorth2latlon(n.eastNorth); 97 n.setEastNorth(n.eastNorth.add(x, y)); 101 98 n.modified = true; 102 99 } … … 108 105 for (Node n : objects) { 109 106 OldState os = it.next(); 110 n.eastNorth = os.eastNorth; 111 n.coor = os.latlon; 107 n.setEastNorth(os.eastNorth); 112 108 n.modified = os.modified; 113 109 }
Note:
See TracChangeset
for help on using the changeset viewer.