Changeset 12074 in josm for trunk/src/org


Ignore:
Timestamp:
2017-05-06T18:18:22+02:00 (7 years ago)
Author:
bastiK
Message:

fixed #14740 - Current displayed data position changes when you press TAB

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

Legend:

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

    r11991 r12074  
    231231
    232232    /**
    233      * Gets the center of the view, rounded to a pixel coordinate
    234      * @return The center position.
    235      * @since 10856
    236      */
    237     public MapViewPoint getCenterAtPixel() {
    238         return getForView(viewWidth / 2, viewHeight / 2);
    239     }
    240 
    241     /**
    242233     * Gets the width of the view on the Screen;
    243234     * @return The width of the view component in screen pixel.
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r12072 r12074  
    297297     */
    298298    public void zoomIn() {
    299         zoomTo(state.getCenterAtPixel().getEastNorth(), scaleZoomIn());
     299        zoomTo(state.getCenter().getEastNorth(), scaleZoomIn());
    300300    }
    301301
     
    304304     */
    305305    public void zoomOut() {
    306         zoomTo(state.getCenterAtPixel().getEastNorth(), scaleZoomOut());
     306        zoomTo(state.getCenter().getEastNorth(), scaleZoomOut());
    307307    }
    308308
     
    401401     */
    402402    public EastNorth getCenter() {
    403         return state.getCenterAtPixel().getEastNorth();
     403        return state.getCenter().getEastNorth();
    404404    }
    405405
Note: See TracChangeset for help on using the changeset viewer.