Changeset 5349 in josm for trunk/src


Ignore:
Timestamp:
2012-07-19T00:05:11+02:00 (12 years ago)
Author:
Don-vip
Message:

see #7847 - Allow to reset Node coordinates to null (this is needed when merging a node in version A with its deleted visible version B)

File:
1 edited

Legend:

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

    r5326 r5349  
    3434    @Override
    3535    public final void setCoor(LatLon coor) {
    36         if(coor != null){
    37             updateCoor(coor, null);
    38         }
     36        updateCoor(coor, null);
    3937    }
    4038
    4139    @Override
    4240    public final void setEastNorth(EastNorth eastNorth) {
    43         if(eastNorth != null) {
    44             updateCoor(null, eastNorth);
    45         }
     41        updateCoor(null, eastNorth);
    4642    }
    4743
     
    113109            this.east = eastNorth.east();
    114110            this.north = eastNorth.north();
    115         } else
    116             throw new IllegalArgumentException();
     111        } else {
     112            this.lat = Double.NaN;
     113            this.lon = Double.NaN;
     114            invalidateEastNorthCache();
     115        }
    117116    }
    118117
Note: See TracChangeset for help on using the changeset viewer.