Changeset 4135 in josm


Ignore:
Timestamp:
2011-06-11T01:17:42+02:00 (8 years ago)
Author:
bastiK
Message:

revert un-caching of Marker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r4126 r4135  
    1616import javax.swing.Icon;
    1717
     18import org.openstreetmap.josm.data.coor.CachedLatLon;
    1819import org.openstreetmap.josm.data.coor.EastNorth;
    1920import org.openstreetmap.josm.data.coor.LatLon;
     
    2223import org.openstreetmap.josm.data.gpx.WayPoint;
    2324import org.openstreetmap.josm.data.preferences.IntegerProperty;
    24 import org.openstreetmap.josm.data.projection.Projections;
    2525import org.openstreetmap.josm.gui.MapView;
    2626import org.openstreetmap.josm.tools.ImageProvider;
     
    7070                             may be adjusted later to sync with other data, so not final */
    7171
    72     private LatLon coor;
     72    private CachedLatLon coor;
    7373
    7474    public final void setCoor(LatLon coor) {
    75         this.coor = new LatLon(coor);
     75        if(this.coor == null) {
     76            this.coor = new CachedLatLon(coor);
     77        } else {
     78            this.coor.setCoor(coor);
     79        }
    7680    }
    7781
     
    8185
    8286    public final void setEastNorth(EastNorth eastNorth) {
    83         this.coor = Projections.inverseProject(eastNorth);
     87        coor.setEastNorth(eastNorth);
    8488    }
    8589
    8690    public final EastNorth getEastNorth() {
    87         return Projections.project(this.coor);
     91        return coor.getEastNorth();
    8892    }
    8993
Note: See TracChangeset for help on using the changeset viewer.