Ignore:
Timestamp:
2016-06-19T16:08:56+02:00 (8 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/junctionchecking
Files:
4 edited

Legend:

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

    r31926 r32329  
    33    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    44    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    5     <property name="plugin.main.version" value="7575"/>
     5    <property name="plugin.main.version" value="10279"/>
    66   
    77    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java

    r30725 r32329  
    6565        //Prüfen, ob der ausgewählte Layer ein OSMDataLayer ist
    6666        if (Main.map == null
    67                 || !Main.map.isVisible() || !(Main.map.mapView.getActiveLayer() instanceof OsmDataLayer)) {
     67                || !Main.map.isVisible() || !(Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer)) {
    6868            JOptionPane.showMessageDialog(Main.parent, tr("this layer is no osm data layer"));
    6969            return;
     
    8484        OSMGraph graph = new OSMGraph();
    8585        //Der vom Benutzer in JOSM ausgewählte, zur Zeit aktive Layer wird der PLugin-OSM-Layer
    86         plugin.setOsmlayer((OsmDataLayer)Main.map.mapView.getActiveLayer());
     86        plugin.setOsmlayer((OsmDataLayer)Main.getLayerManager().getActiveLayer());
    8787        Iterator<Node> it = Main.main.getCurrentDataSet().getNodes().iterator();
    8888        while (it.hasNext()) {
     
    147147        Main.map.selectMapMode(plugin.getJcMapMode());
    148148        Main.main.addLayer(plugin.getChannelDigraphLayer());
    149         Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
     149        Main.getLayerManager().setActiveLayer(plugin.getChannelDigraphLayer());
    150150    }
    151151}
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java

    r30737 r32329  
    9191            plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i));
    9292        }
    93         Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
     93        Main.getLayerManager().setActiveLayer(plugin.getChannelDigraphLayer());
    9494    }
    9595}
  • applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java

    r30737 r32329  
    4242            }
    4343        }
    44         Main.map.mapView.setActiveLayer(plugin.getOsmlayer());
     44        Main.getLayerManager().setActiveLayer(plugin.getOsmlayer());
    4545        plugin.getOsmlayer().data.setSelected(ways);
    4646
Note: See TracChangeset for help on using the changeset viewer.