Ignore:
Timestamp:
2009-07-19T14:57:34+02:00 (15 years ago)
Author:
Gubaer
Message:

new: DownloadReferrersAction - downloads the set of primitives referring to the currently selected primitives

File:
1 edited

Legend:

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

    r1800 r1810  
    5353        }
    5454
     55        protected OsmDataLayer getEditLayer() {
     56            if (Main.map == null) return null;
     57            if (Main.map.mapView == null) return null;
     58            return Main.map.mapView.getEditLayer();
     59        }
     60
    5561        @Override protected void finish() {
    5662            if (dataSet == null)
     
    6672            }
    6773            rememberDownloadedData(dataSet);
    68             if (newLayer) {
     74            if (newLayer || getEditLayer() == null) {
    6975                OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null);
    7076                Main.main.addLayer(layer);
    7177            } else {
    72                 Main.main.createOrGetEditLayer().mergeFrom(dataSet);
     78                getEditLayer().mergeFrom(dataSet);
    7379            }
    7480
Note: See TracChangeset for help on using the changeset viewer.