Changeset 32484 in osm for applications/editors/josm


Ignore:
Timestamp:
2016-07-01T09:42:01+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java

    r30738 r32484  
    8282                data.storageFile = file;
    8383                GpxLayer gpxLayer = new GpxLayer(data, file.getName());
    84                 Main.main.addLayer(gpxLayer);
     84                Main.getLayerManager().addLayer(gpxLayer);
    8585                if (Main.pref.getBoolean("marker.makeautomarkers", true)) {
    8686                    MarkerLayer ml = new MarkerLayer(data, tr("Markers from {0}", file.getName()), file, gpxLayer);
    8787                    if (ml.data.size() > 0) {
    88                         Main.main.addLayer(ml);
     88                        Main.getLayerManager().addLayer(ml);
    8989                    }
    9090                }
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java

    r30737 r32484  
    7474    @Override
    7575    public void importData(File tcxFile, ProgressMonitor progressMonitor) throws IOException {
    76         //this.tcxFile = tcxFile;
    7776        parseFile(tcxFile);
    7877
     
    8079        gpxData.storageFile = tcxFile;
    8180        GpxLayer gpxLayer = new GpxLayer(gpxData, tcxFile.getName());
    82         Main.main.addLayer(gpxLayer);
     81        Main.getLayerManager().addLayer(gpxLayer);
    8382        if (Main.pref.getBoolean("marker.makeautomarkers", true))
    8483        {
     
    8685            if (ml.data.size() > 0)
    8786            {
    88                 Main.main.addLayer(ml);
     87                Main.getLayerManager().addLayer(ml);
    8988            }
    9089        }
    91 
    9290    }
    9391
Note: See TracChangeset for help on using the changeset viewer.