Changeset 8285 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2015-04-28T00:49:49+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/Command.java
r7005 r8285 60 60 public static class OldNodeState { 61 61 62 final LatLon latlon; 63 final EastNorth eastNorth; // cached EastNorth to be used for applying exact displacement 64 final boolean modified; 62 private final LatLon latlon; 63 private final EastNorth eastNorth; // cached EastNorth to be used for applying exact displacement 64 private final boolean modified; 65 65 66 66 /** … … 72 72 eastNorth = node.getEastNorth(); 73 73 modified = node.isModified(); 74 } 75 76 /** 77 * Returns old lat/lon. 78 * @return old lat/lon 79 * @see Node#getCoor() 80 */ 81 public final LatLon getLatlon() { 82 return latlon; 83 } 84 85 /** 86 * Returns old east/north. 87 * @return old east/north 88 * @see Node#getEastNorth() 89 */ 90 public final EastNorth getEastNorth() { 91 return eastNorth; 92 } 93 94 /** 95 * Returns old modified state. 96 * @return old modified state 97 * @see Node #isModified() 98 */ 99 public final boolean isModified() { 100 return modified; 74 101 } 75 102 } -
trunk/src/org/openstreetmap/josm/command/MoveCommand.java
r7005 r8285 171 171 for (Node n : nodes) { 172 172 OldNodeState os = it.next(); 173 if (os. eastNorth != null) {174 n.setEastNorth(os. eastNorth.add(x, y));173 if (os.getEastNorth() != null) { 174 n.setEastNorth(os.getEastNorth().add(x, y)); 175 175 } 176 176 } … … 197 197 for (Node n : nodes) { 198 198 OldNodeState os = it.next(); 199 n.setCoor(os. latlon);200 n.setModified(os. modified);199 n.setCoor(os.getLatlon()); 200 n.setModified(os.isModified()); 201 201 } 202 202 } -
trunk/src/org/openstreetmap/josm/command/RotateCommand.java
r6890 r8285 76 76 double cosPhi = Math.cos(rotationAngle); 77 77 double sinPhi = Math.sin(rotationAngle); 78 EastNorth oldEastNorth = oldStates.get(n). eastNorth;78 EastNorth oldEastNorth = oldStates.get(n).getEastNorth(); 79 79 double x = oldEastNorth.east() - pivot.east(); 80 80 double y = oldEastNorth.north() - pivot.north(); -
trunk/src/org/openstreetmap/josm/command/ScaleCommand.java
r6890 r8285 26 26 /** 27 27 * World position of the mouse when the user started the command. 28 *29 28 */ 30 EastNorth startEN = null; 29 private EastNorth startEN = null; 31 30 32 31 /** … … 69 68 protected void transformNodes() { 70 69 for (Node n : nodes) { 71 EastNorth oldEastNorth = oldStates.get(n). eastNorth;70 EastNorth oldEastNorth = oldStates.get(n).getEastNorth(); 72 71 double dx = oldEastNorth.east() - pivot.east(); 73 72 double dy = oldEastNorth.north() - pivot.north(); -
trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
r7005 r8285 94 94 for (Node n : nodes) { 95 95 OldNodeState os = oldStates.get(n); 96 n.setCoor(os. latlon);97 n.setModified(os. modified);96 n.setCoor(os.getLatlon()); 97 n.setModified(os.isModified()); 98 98 } 99 99 }
Note:
See TracChangeset
for help on using the changeset viewer.