Changeset 15767 in josm


Ignore:
Timestamp:
2020-01-26T15:05:08+01:00 (5 weeks ago)
Author:
GerdP
Message:

fix #18623: Zoom is too close when downloading a single node
Don't zoom to viewport bounds with no extend.

File:
1 edited

Legend:

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

    r15611 r15767  
    856856        if (viewport == null) return;
    857857        if (viewport.getBounds() != null) {
    858             zoomTo(viewport.getBounds());
     858            if (!viewport.getBounds().hasExtend()) {
     859                // see #18623
     860                BoundingXYVisitor v = new BoundingXYVisitor();
     861                v.visit(viewport.getBounds());
     862                zoomTo(v);
     863            } else {
     864                zoomTo(viewport.getBounds());
     865            }
     866
    859867        } else {
    860868            zoomTo(viewport.getCenter(), viewport.getScale(), true);
Note: See TracChangeset for help on using the changeset viewer.