- Timestamp:
- 2018-06-13T22:55:57+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r13927 r13928 11 11 import java.util.Collections; 12 12 import java.util.HashSet; 13 import java.util.Objects; 13 14 import java.util.Set; 14 15 import java.util.concurrent.Future; … … 186 187 public abstract static class AbstractInternalTask extends PleaseWaitRunnable { 187 188 188 protected final boolean newLayer;189 protected final DownloadParams settings; 189 190 protected final boolean zoomAfterDownload; 190 191 protected DataSet dataSet; … … 201 202 public AbstractInternalTask(DownloadParams settings, String title, boolean ignoreException, boolean zoomAfterDownload) { 202 203 super(title, ignoreException); 203 this. newLayer = settings.isNewLayer();204 this.settings = Objects.requireNonNull(settings); 204 205 this.zoomAfterDownload = zoomAfterDownload; 205 206 } … … 218 219 boolean zoomAfterDownload) { 219 220 super(title, progressMonitor, ignoreException); 220 this. newLayer = settings.isNewLayer();221 this.settings = Objects.requireNonNull(settings); 221 222 this.zoomAfterDownload = zoomAfterDownload; 222 223 } … … 260 261 261 262 protected OsmDataLayer createNewLayer(String layerName) { 263 if (layerName == null || layerName.isEmpty()) { 264 layerName = settings.getLayerName(); 265 } 262 266 if (layerName == null || layerName.isEmpty()) { 263 267 layerName = OsmDataLayer.createNewName(); … … 282 286 protected OsmDataLayer addNewLayerIfRequired(String newLayerName) { 283 287 long numDataLayers = getNumModifiableDataLayers(); 284 if ( newLayer|| numDataLayers == 0 || (numDataLayers > 1 && getEditLayer() == null)) {288 if (settings.isNewLayer() || numDataLayers == 0 || (numDataLayers > 1 && getEditLayer() == null)) { 285 289 // the user explicitly wants a new layer, we don't have any layer at all 286 290 // or it is not clear which layer to merge to
Note:
See TracChangeset
for help on using the changeset viewer.