Changeset 1810 in josm


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

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

Location:
trunk
Files:
2 added
2 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
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r1808 r1810  
    3434import org.openstreetmap.josm.actions.DistributeAction;
    3535import org.openstreetmap.josm.actions.DownloadAction;
     36import org.openstreetmap.josm.actions.DownloadReferrersAction;
    3637import org.openstreetmap.josm.actions.DuplicateAction;
    3738import org.openstreetmap.josm.actions.ExitAction;
     
    9798    public final JosmAction gpxExport = new GpxExportAction();
    9899    public final DownloadAction download = new DownloadAction();
     100    public final DownloadReferrersAction downloadReferrers = new DownloadReferrersAction();
    99101    public final JosmAction update = new UpdateDataAction();
    100102    public final JosmAction updateSelection = new UpdateSelectionAction();
     
    198200        fileMenu.addSeparator();
    199201        add(fileMenu, download);
     202        add(fileMenu, downloadReferrers);
    200203        add(fileMenu, upload);
    201204        add(fileMenu, update);
Note: See TracChangeset for help on using the changeset viewer.