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

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

Location:
trunk/src/org/openstreetmap/josm/gui/layer
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r10175 r10364  
    300300            drawHelper.readPreferences(getName());
    301301            drawHelper.drawAll(g, mv, visibleSegments);
    302             if (Main.map.mapView.getActiveLayer() == this) {
     302            if (Main.getLayerManager().getActiveLayer() == this) {
    303303                drawHelper.drawColorBar(g, mv);
    304304            }
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r10181 r10364  
    171171        long memoryBytesRequired = 50L * 1024L * 1024L; // assumed minimum JOSM memory footprint
    172172        if (Main.map != null && Main.map.mapView != null) {
    173             for (Layer layer: Main.map.mapView.getAllLayers()) {
     173            for (Layer layer: Main.getLayerManager().getLayers()) {
    174174                memoryBytesRequired += layer.estimateMemoryUsage();
    175175            }
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r10308 r10364  
    181181                // If none, we'll zoom to the bounding box of the layer with the photos.
    182182                boolean boundingBoxedLayerFound = false;
    183                 for (Layer l: Main.map.mapView.getAllLayers()) {
     183                for (Layer l: Main.getLayerManager().getLayers()) {
    184184                    if (l != yLayer) {
    185185                        BoundingXYVisitor bbox = new BoundingXYVisitor();
     
    557557    public void actionPerformed(ActionEvent arg0) {
    558558        // Construct the list of loaded GPX tracks
    559         Collection<Layer> layerLst = Main.map.mapView.getAllLayers();
     559        Collection<Layer> layerLst = Main.getLayerManager().getLayers();
    560560        GpxDataWrapper defaultItem = null;
    561561        for (Layer cur : layerLst) {
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r10173 r10364  
    784784    private void clearOtherCurrentPhotos() {
    785785        for (GeoImageLayer layer:
    786                  Main.map.mapView.getLayersOfType(GeoImageLayer.class)) {
     786                 Main.getLayerManager().getLayersOfType(GeoImageLayer.class)) {
    787787            if (layer != this) {
    788788                layer.clearCurrentPhoto(false);
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackAction.java

    r10228 r10364  
    116116            return null;
    117117        }
    118         List<AbstractTileSourceLayer> targetLayers = Main.map.mapView.getLayersOfType(AbstractTileSourceLayer.class);
     118        List<AbstractTileSourceLayer> targetLayers = Main.getLayerManager().getLayersOfType(AbstractTileSourceLayer.class);
    119119        if (targetLayers.isEmpty()) {
    120120            if (!GraphicsEnvironment.isHeadless()) {
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java

    r10300 r10364  
    449449            return;
    450450        Marker m = null;
    451         Layer l = Main.map.mapView.getActiveLayer();
     451        Layer l = Main.getLayerManager().getActiveLayer();
    452452        if (l != null) {
    453453            m = getAdjacentMarker(startMarker, next, l);
    454454        }
    455455        if (m == null) {
    456             for (Layer layer : Main.map.mapView.getAllLayers()) {
     456            for (Layer layer : Main.getLayerManager().getLayers()) {
    457457                m = getAdjacentMarker(startMarker, next, layer);
    458458                if (m != null) {
Note: See TracChangeset for help on using the changeset viewer.