Changeset 1662 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-06-10T18:01:55+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r1302 r1662 97 97 double maxlat = Double.parseDouble(bounds[2]); 98 98 double maxlon = Double.parseDouble(bounds[3]); 99 99 100 100 v.visit(Main.proj.latlon2eastNorth(new LatLon(minlat, minlon))); 101 101 v.visit(Main.proj.latlon2eastNorth(new LatLon(maxlat, maxlon))); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r1518 r1662 318 318 double oldScale = this.scale; 319 319 320 if (box == null || box.min == null || box.max == null || box.min.equals(box.max)) {320 if (box == null || box.min == null || box.max == null) { 321 321 // no bounds means whole world 322 322 center = getProjection().latlon2eastNorth(new LatLon(0,0)); … … 326 326 scale = Math.max(scaleX, scaleY); // minimum scale to see all of the screen 327 327 } else { 328 if(box.min.equals(box.max)) 329 box.enlargeBoundingBox(); 328 330 center = new EastNorth(box.min.east()/2+box.max.east()/2, box.min.north()/2+box.max.north()/2); 329 331 double scaleX = (box.max.east()-box.min.east())/w; … … 365 367 l.activeLayerChange(old, layer); 366 368 } 367 369 368 370 /* This only makes the buttons look disabled. Disabling the actions as well requires 369 371 * the user to re-select the tool after i.e. moving a layer. While testing I found
Note:
See TracChangeset
for help on using the changeset viewer.