Changeset 11553 in josm for trunk/src/org/openstreetmap/josm/gui/MapViewState.java
- Timestamp:
- 2017-02-12T16:32:18+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapViewState.java
r11470 r11553 12 12 import java.io.Serializable; 13 13 import java.util.Objects; 14 import java.util.Optional; 14 15 15 16 import javax.swing.JComponent; … … 376 377 377 378 private static EastNorth calculateDefaultCenter() { 378 Bounds b = DownloadDialog.getSavedDownloadBounds(); 379 if (b == null) { 380 b = Main.getProjection().getWorldBoundsLatLon(); 381 } 379 Bounds b = Optional.ofNullable(DownloadDialog.getSavedDownloadBounds()).orElseGet( 380 () -> Main.getProjection().getWorldBoundsLatLon()); 382 381 return Main.getProjection().latlon2eastNorth(b.getCenter()); 383 382 }
Note:
See TracChangeset
for help on using the changeset viewer.