Ignore:
Timestamp:
2010-03-29T21:34:13+02:00 (14 years ago)
Author:
bastiK
Message:

fixed #4815 (after [3154] you cannot remove a node from quadbuckets if the coordinates have changed -> first remove the node from quadbuckets then change the coordinates then add it back)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Node.java

    r3159 r3163  
    1515
    1616    private CachedLatLon coor;
     17    private BBox bbox;
    1718
    1819    public final void setCoor(LatLon coor) {
     
    186187    @Override
    187188    public BBox getBBox() {
    188         if (coor == null)
    189             return new BBox(0, 0, 0, 0);
    190         else
    191             return new BBox(coor, coor);
     189        if (getDataSet() == null)
     190            return new BBox(this);
     191        if (bbox == null) {
     192            bbox = new BBox(this);
     193        }
     194        return new BBox(bbox);
    192195    }
    193196
    194197    @Override
    195198    public void updatePosition() {
    196         // Do nothing for now, but in future replace CachedLatLon with simple doubles and update precalculated EastNorth value here
     199        bbox = new BBox(this);
     200        // TODO: replace CachedLatLon with simple doubles and update precalculated EastNorth value here
    197201    }
    198202
Note: See TracChangeset for help on using the changeset viewer.