Ignore:
Timestamp:
2016-06-22T22:18:24+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13029 - Replace hookUpMapView by attachToMapView (patch by michael2402, modified) - gsoc-core

File:
1 edited

Legend:

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

    r10446 r10458  
    5252import org.openstreetmap.josm.data.projection.Projection;
    5353import org.openstreetmap.josm.data.projection.Projections;
    54 import org.openstreetmap.josm.gui.MapViewState.MapViewPoint;
    5554import org.openstreetmap.josm.gui.help.Helpful;
    5655import org.openstreetmap.josm.gui.layer.NativeScaleLayer;
     
    454453
    455454    public ProjectionBounds getProjectionBounds(Rectangle r) {
    456         MapViewState state = getState();
    457         MapViewPoint p1 = state.getForView(r.getMinX(), r.getMinY());
    458         MapViewPoint p2 = state.getForView(r.getMaxX(), r.getMaxY());
    459         return p1.rectTo(p2).getProjectionBounds();
     455        return getState().getViewArea(r).getProjectionBounds();
    460456    }
    461457
     
    15111507     */
    15121508    public int getViewID() {
    1513         String x = getCenter().east() + '_' + getCenter().north() + '_' + getScale() + '_' +
    1514                 getWidth() + '_' + getHeight() + '_' + getProjection().toString();
     1509        EastNorth center = getCenter();
     1510        String x = new StringBuilder().append(center.east())
     1511                          .append('_').append(center.north())
     1512                          .append('_').append(getScale())
     1513                          .append('_').append(getWidth())
     1514                          .append('_').append(getHeight())
     1515                          .append('_').append(getProjection()).toString();
    15151516        CRC32 id = new CRC32();
    15161517        id.update(x.getBytes(StandardCharsets.UTF_8));
Note: See TracChangeset for help on using the changeset viewer.