Changeset 33684 in osm for applications/editors/josm/plugins/cadastre-fr
- Timestamp:
- 2017-09-30T00:24:47+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/download/CadastreDownloadTask.java
r33680 r33684 9 9 import org.openstreetmap.josm.data.Bounds; 10 10 import org.openstreetmap.josm.gui.MainApplication; 11 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 11 12 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 12 13 … … 23 24 @Override 24 25 public Future<?> loadUrl(boolean newLayer, String url, ProgressMonitor progressMonitor) { 25 downloadTask = new DownloadTask(newLayer, new CadastreServerReader(url), progressMonitor);26 downloadTask = new InternalDownloadTask(newLayer, url, progressMonitor); 26 27 currentBounds = null; 27 28 return MainApplication.worker.submit(downloadTask); … … 37 38 return tr("Download cadastre data"); 38 39 } 40 41 class InternalDownloadTask extends DownloadTask { 42 43 private final String url; 44 45 InternalDownloadTask(boolean newLayer, String url, ProgressMonitor progressMonitor) { 46 super(newLayer, new CadastreServerReader(url), progressMonitor); 47 this.url = url; 48 } 49 50 @Override 51 protected OsmDataLayer createNewLayer(String layerName) { 52 return super.createNewLayer(layerName != null ? layerName : url.substring(url.lastIndexOf('/')+1)); 53 } 54 } 39 55 }
Note:
See TracChangeset
for help on using the changeset viewer.