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/mapdust
Files:
2 edited

Legend:

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

    r31923 r32329  
    33    <!-- properties -->
    44    <property name="commit.message" value="MapDust bug reporter plugin"/>
    5     <property name="plugin.main.version" value="7001"/>
     5    <property name="plugin.main.version" value="10279"/>
    66    <property name="apidoc.dir" value="doc"/>
    77
  • applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java

    r30737 r32329  
    363363            if (event.getButton() == MouseEvent.BUTTON1) {
    364364                if (event.getClickCount() == 2 && !event.isConsumed()) {
    365                     if (Main.map.mapView.getActiveLayer() == getMapdustLayer()) {
     365                    if (Main.getLayerManager().getActiveLayer() == getMapdustLayer()) {
    366366                        /* show add bug dialog */
    367367                        MapdustBug bug = mapdustGUI.getSelectedBug();
     
    620620     */
    621621    private boolean containsMapdustLayer() {
    622         boolean contains = false;
    623         List<Layer> all = Main.map.mapView.getAllLayersAsList();
    624         if (mapdustLayer != null && all.contains(mapdustLayer)) {
    625             contains = true;
    626         }
    627         return contains;
     622        return mapdustLayer != null && Main.getLayerManager().containsLayer(mapdustLayer);
    628623    }
    629624
Note: See TracChangeset for help on using the changeset viewer.