Changeset 35864 in osm


Ignore:
Timestamp:
2021-11-11T09:31:30+01:00 (3 years ago)
Author:
GerdP
Message:

fix #17366: IAE: Listener plugins.fastdraw.FastDrawingMode was not registered before or already removed
see #17465

  • Disable edit map modes when layer is in readonly mode (patch by Woazboat, modified to remove unused import)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FastDraw/src/org/openstreetmap/josm/plugins/fastdraw/FastDrawingMode.java

    r35360 r35864  
    4040import org.openstreetmap.josm.gui.layer.Layer;
    4141import org.openstreetmap.josm.gui.layer.MapViewPaintable;
    42 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4342import org.openstreetmap.josm.gui.util.KeyPressReleaseListener;
    4443import org.openstreetmap.josm.gui.util.ModifierExListener;
     
    9998    @Override
    10099    public void enterMode() {
     100        if (!isEnabled())
     101            return;
    101102        super.enterMode();
    102103        lineWasSaved = false;
     
    141142    @Override
    142143    public boolean layerIsSupported(Layer l) {
    143         return l instanceof OsmDataLayer;
     144        return isEditableDataLayer(l);
    144145    }
    145146
Note: See TracChangeset for help on using the changeset viewer.