Changeset 11840 in josm for trunk/src/org
- Timestamp:
- 2017-04-05T11:13:08+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r11835 r11840 635 635 // values, so it is not an issue in this case. It only shows when zooming 636 636 // in & back out, etc. 637 MapViewState mvs = getState().usingScale(newScale).movedTo(state.getCenterAtPixel(), newCenter); 637 MapViewState mvs = getState().usingScale(newScale); 638 mvs = mvs.movedTo(mvs.getCenter(), newCenter); 638 639 Point2D enOrigin = mvs.getPointFor(new EastNorth(0, 0)).getInView(); 639 640 Point2D enOriginAligned = new Point2D.Double(Math.round(enOrigin.getX()), Math.round(enOrigin.getY())); … … 657 658 */ 658 659 private void zoomNoUndoTo(EastNorth newCenter, double newScale, boolean initial) { 659 if (!newCenter.equals(getCenter())) {660 EastNorth oldCenter = getCenter();661 state = state.movedTo(state.getCenterAtPixel(), newCenter);662 if (!initial) {663 firePropertyChange(PROPNAME_CENTER, oldCenter, newCenter);664 }665 }666 660 if (!Utils.equalsEpsilon(getScale(), newScale)) { 667 661 double oldScale = getScale(); 668 662 state = state.usingScale(newScale); 669 // temporary. Zoom logic needs to be moved.670 state = state.movedTo(state.getCenterAtPixel(), newCenter);671 663 if (!initial) { 672 664 firePropertyChange(PROPNAME_SCALE, oldScale, newScale); 665 } 666 } 667 if (!newCenter.equals(getCenter())) { 668 EastNorth oldCenter = getCenter(); 669 state = state.movedTo(state.getCenter(), newCenter); 670 if (!initial) { 671 firePropertyChange(PROPNAME_CENTER, oldCenter, newCenter); 673 672 } 674 673 }
Note:
See TracChangeset
for help on using the changeset viewer.