Ignore:
Timestamp:
2009-06-06T13:38:32+02:00 (15 years ago)
Author:
stoecker
Message:

fix #2302 - patch by jttt - some code cleanup for better encapsulation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/MoveCommand.java

    r1169 r1636  
    1515import javax.swing.tree.MutableTreeNode;
    1616
    17 import org.openstreetmap.josm.Main;
    1817import org.openstreetmap.josm.data.coor.EastNorth;
    1918import org.openstreetmap.josm.data.coor.LatLon;
     
    8887    public void moveAgain(double x, double y) {
    8988        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));
    9290        }
    9391        this.x += x;
     
    9795    @Override public boolean executeCommand() {
    9896        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));
    10198            n.modified = true;
    10299        }
     
    108105        for (Node n : objects) {
    109106            OldState os = it.next();
    110             n.eastNorth = os.eastNorth;
    111             n.coor = os.latlon;
     107            n.setEastNorth(os.eastNorth);
    112108            n.modified = os.modified;
    113109        }
Note: See TracChangeset for help on using the changeset viewer.