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

Location:
applications/editors/josm/plugins/waypoint_search
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/waypoint_search/build.xml

    r30416 r32329  
    55    <property name="commit.message" value="bugfix of search when layer is added"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="7001"/>
     7    <property name="plugin.main.version" value="10279"/>
    88
    99    <property name="plugin.author" value="Åsmund Realfsen - realfsen at gmx.net"/>
  • 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.