- Timestamp:
- 2012-11-25T21:24:25+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r5460 r5600 126 126 } 127 127 128 final Bounds bbox = new Bounds(new LatLon(minlat, minlon), new LatLon(maxlat, maxlon)); 128 129 if (args.containsKey("select") && PermissionPrefWithDefault.CHANGE_SELECTION.isAllowed()) { 129 130 // select objects after downloading, zoom to selection. … … 168 169 ds.setSelected(newSel); 169 170 if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) { 170 AutoScaleAction.autoScale("selection"); 171 // zoom_mode=(download|selection), defaults to selection 172 if (!"download".equals(args.get("zoom_mode"))) { 173 AutoScaleAction.autoScale("selection"); 174 } else { 175 zoom(bbox); 176 } 171 177 } 172 178 if (Main.isDisplayingMapView() && Main.map.relationListDialog != null) { … … 179 185 } else if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) { 180 186 // after downloading, zoom to downloaded area. 181 zoom( minlat, maxlat, minlon, maxlon);187 zoom(bbox); 182 188 } 183 189 … … 215 221 } 216 222 217 protected void zoom(double minlat, double maxlat, double minlon, double maxlon) { 218 final Bounds bounds = new Bounds(new LatLon(minlat, minlon), 219 new LatLon(maxlat, maxlon)); 220 223 protected void zoom(final Bounds bounds) { 221 224 // make sure this isn't called unless there *is* a MapView 222 //223 225 if (Main.isDisplayingMapView()) { 224 226 Main.worker.execute(new Runnable() {
Note:
See TracChangeset
for help on using the changeset viewer.