Changeset 10848 in josm


Ignore:
Timestamp:
2016-08-18T21:35:10+02:00 (8 years ago)
Author:
simon04
Message:

see #12950 - No not zoom after "Download in current view"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/DownloadOsmInViewAction.java

    r10816 r10848  
    1111import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;
    1212import org.openstreetmap.josm.data.Bounds;
     13import org.openstreetmap.josm.io.BoundingBoxDownloader;
    1314import org.openstreetmap.josm.io.OnlineResource;
    1415
     
    3132    public void actionPerformed(ActionEvent e) {
    3233        final Bounds bounds = Main.map.mapView.getRealBounds();
    33         DownloadOsmTask task = new DownloadOsmTask();
    34         Future<?> future = task.download(false, bounds, null);
     34        DownloadOsmInViewTask task = new DownloadOsmInViewTask();
     35        Future<?> future = task.download(bounds);
    3536        Main.worker.submit(new PostDownloadHandler(task, future));
    3637    }
     
    4142                && !Main.isOffline(OnlineResource.OSM_API));
    4243    }
     44
     45    private static class DownloadOsmInViewTask extends DownloadOsmTask {
     46        public Future<?> download(Bounds downloadArea) {
     47            return download(new DownloadTask(false, new BoundingBoxDownloader(downloadArea), null, false), downloadArea);
     48        }
     49    }
    4350}
Note: See TracChangeset for help on using the changeset viewer.