Ignore:
Timestamp:
2016-06-19T16:08:56+02:00 (9 years ago)
Author:
donvip
Message:

fix #josm12953 - Replace most uses of MapView.getActiveLayer and similar methods (patch by michael2402, modified) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java

    r30777 r32329  
    1818        if (gpxLayersExist()) {
    1919            //Loop over marker (waypoint) layers.. it could be more than one
    20             for (Iterator<MarkerLayer> it = Main.map.mapView.getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) {
     20            for (Iterator<MarkerLayer> it = Main.getLayerManager().getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) {
    2121                //loop over each marker (waypoint)
    2222                for (Iterator<Marker> markerIterator = it.next().data.iterator(); markerIterator.hasNext();) {
     
    3232   
    3333    static boolean gpxLayersExist() {
    34         return Main.map != null && Main.map.mapView.hasLayers() && !Main.map.mapView.getLayersOfType(MarkerLayer.class).isEmpty();
     34        return !Main.getLayerManager().getLayersOfType(MarkerLayer.class).isEmpty();
    3535    }
    3636}
Note: See TracChangeset for help on using the changeset viewer.