Changeset 12213 in josm


Ignore:
Timestamp:
2017-05-18T23:43:13+02:00 (5 months ago)
Author:
michael2402
Message:

See #13415: Make code shorter by using LatLon.getEastNorth()

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapViewState.java

    r12162 r12213  
    395395        Bounds b = Optional.ofNullable(DownloadDialog.getSavedDownloadBounds()).orElseGet(
    396396                () -> Main.getProjection().getWorldBoundsLatLon());
    397         return Main.getProjection().latlon2eastNorth(b.getCenter());
     397        return b.getCenter().getEastNorth();
    398398    }
    399399
  • trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDataText.java

    r12161 r12213  
    191191        if (bbox != null) {
    192192            add(tr("Bounding box: "), bbox.toStringCSV(", "));
    193             EastNorth bottomRigth = Main.getProjection().latlon2eastNorth(bbox.getBottomRight());
    194             EastNorth topLeft = Main.getProjection().latlon2eastNorth(bbox.getTopLeft());
     193            EastNorth bottomRigth = bbox.getBottomRight().getEastNorth();
     194            EastNorth topLeft = bbox.getTopLeft().getEastNorth();
    195195            add(tr("Bounding box (projected): "),
    196196                    Double.toString(topLeft.east()), ", ",
Note: See TracChangeset for help on using the changeset viewer.