Changeset 11653 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-03-03T21:38:29+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
r11553 r11653 169 169 170 170 public void setCoordinates(LatLon ll) { 171 latLonCoordinates= Optional.ofNullable(ll).orElse(LatLon.ZERO);172 tfLatLon.setText(l atLonCoordinates.latToString(CoordinateFormat.getDefaultFormat()) + ' ' +173 l atLonCoordinates.lonToString(CoordinateFormat.getDefaultFormat()));174 EastNorth en = Main.getProjection().latlon2eastNorth(l atLonCoordinates);171 LatLon llc = Optional.ofNullable(ll).orElse(LatLon.ZERO); 172 tfLatLon.setText(llc.latToString(CoordinateFormat.getDefaultFormat()) + ' ' + 173 llc.lonToString(CoordinateFormat.getDefaultFormat())); 174 EastNorth en = Main.getProjection().latlon2eastNorth(llc); 175 175 tfEastNorth.setText(Double.toString(en.east()) + ' ' + Double.toString(en.north())); 176 // Both latLonCoordinates and eastNorthCoordinates may have been reset to null if ll is out of the world 177 latLonCoordinates = llc; 178 eastNorthCoordinates = en; 176 179 setOkEnabled(true); 177 180 }
Note:
See TracChangeset
for help on using the changeset viewer.