Ignore:
Timestamp:
2016-06-12T20:46:23+02:00 (4 years ago)
Author:
stoecker
Message:

gsoc-core - patch by Michael Zangl - see #12953 - remove deprecation usage

Location:
trunk/src/org/openstreetmap/josm/io
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/NoteImporter.java

    r9797 r10364  
    3838        try (InputStream is = Compression.getUncompressedFileInputStream(file)) {
    3939            final NoteLayer layer = loadLayer(is, file, file.getName(), progressMonitor);
    40             if (Main.map == null || !Main.map.mapView.hasLayer(layer)) {
     40            if (Main.map == null || !Main.getLayerManager().containsLayer(layer)) {
    4141                GuiHelper.runInEDT(new Runnable() {
    4242                    @Override
     
    6969        List<NoteLayer> noteLayers = null;
    7070        if (Main.map != null) {
    71             noteLayers = Main.map.mapView.getLayersOfType(NoteLayer.class);
     71            noteLayers = Main.getLayerManager().getLayersOfType(NoteLayer.class);
    7272        }
    7373        final NoteLayer layer;
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r10212 r10364  
    249249             * been disabled! */
    250250            if (Main.isDisplayingMapView()) {
    251                 for (Layer l : Main.map.mapView.getLayersOfType(ImageryLayer.class)) {
     251                for (Layer l : Main.getLayerManager().getLayersOfType(ImageryLayer.class)) {
    252252                    if (((ImageryLayer) l).getInfo().isBlacklisted()) {
    253253                        Main.info(tr("Removed layer {0} because it is not allowed by the configured API.", l.getName()));
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java

    r10116 r10364  
    9595        final ImageryInfo imgInfo = buildImageryInfo();
    9696        if (Main.isDisplayingMapView()) {
    97             for (ImageryLayer layer : Main.map.mapView.getLayersOfType(ImageryLayer.class)) {
     97            for (ImageryLayer layer : Main.getLayerManager().getLayersOfType(ImageryLayer.class)) {
    9898                if (layer.getInfo().equals(imgInfo)) {
    9999                    Main.info("Imagery layer already exists: "+imgInfo);
  • trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java

    r9983 r10364  
    4444    public Collection<Layer> getDependencies() {
    4545        Layer gpxLayer = layer.fromLayer;
    46         if (gpxLayer != null && Main.map.mapView.hasLayer(gpxLayer))
     46        if (gpxLayer != null && Main.getLayerManager().containsLayer(gpxLayer))
    4747            return Collections.singleton(gpxLayer);
    4848        return Collections.emptySet();
Note: See TracChangeset for help on using the changeset viewer.