Changeset 10458 in josm for trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
- Timestamp:
- 2016-06-22T22:18:24+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r10446 r10458 52 52 import org.openstreetmap.josm.data.projection.Projection; 53 53 import org.openstreetmap.josm.data.projection.Projections; 54 import org.openstreetmap.josm.gui.MapViewState.MapViewPoint;55 54 import org.openstreetmap.josm.gui.help.Helpful; 56 55 import org.openstreetmap.josm.gui.layer.NativeScaleLayer; … … 454 453 455 454 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(); 460 456 } 461 457 … … 1511 1507 */ 1512 1508 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(); 1515 1516 CRC32 id = new CRC32(); 1516 1517 id.update(x.getBytes(StandardCharsets.UTF_8));
Note:
See TracChangeset
for help on using the changeset viewer.