Changeset 18073 in josm
- Timestamp:
- 2021-07-19T13:28:26+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java
r17841 r18073 298 298 @Override 299 299 public void layerAdded(LayerAddEvent e) { 300 if (e.getAddedLayer() instanceof OsmDataLayer) { 301 registerNewlayer((OsmDataLayer) e.getAddedLayer()); 302 } else if (e.getAddedLayer() instanceof NoteLayer) { 303 registerNewlayer((NoteLayer) e.getAddedLayer()); 304 } else if (e.getAddedLayer() instanceof AbstractModifiableLayer) { 305 synchronized (layersLock) { 306 layersInfo.add(new AutosaveLayerInfo<>((AbstractModifiableLayer) e.getAddedLayer())); 300 Layer layer = e.getAddedLayer(); 301 if (layer.isSavable()) { 302 if (layer instanceof OsmDataLayer) { 303 registerNewlayer((OsmDataLayer) layer); 304 } else if (layer instanceof NoteLayer) { 305 registerNewlayer((NoteLayer) layer); 306 } else if (layer instanceof AbstractModifiableLayer) { 307 synchronized (layersLock) { 308 layersInfo.add(new AutosaveLayerInfo<>((AbstractModifiableLayer) layer)); 309 } 310 } else { 311 Logging.error("Unsupported savable layer type: {0}", layer.getClass().getSimpleName()); 307 312 } 308 313 }
Note:
See TracChangeset
for help on using the changeset viewer.