Changeset 6075 in josm


Ignore:
Timestamp:
2013-07-19T02:32:43+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8823 - enable map paint styles switching with marker layers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java

    r6034 r6075  
    1717import org.openstreetmap.josm.gui.layer.GpxLayer;
    1818import org.openstreetmap.josm.gui.layer.Layer;
     19import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    1920import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener;
    2021import org.openstreetmap.josm.gui.util.StayOpenCheckBoxMenuItem;
     
    6465        @Override
    6566        public void updateEnabledState() {
    66             setEnabled(Main.isDisplayingMapView() && (Main.main.getEditLayer() != null || mapHasGpxLayer()));
     67            setEnabled(Main.isDisplayingMapView() && (Main.main.getEditLayer() != null || mapHasGpxorMarkerLayer()));
    6768        }
    6869
    69         private boolean mapHasGpxLayer() {
     70        private boolean mapHasGpxorMarkerLayer() {
    7071            for (Layer layer : Main.map.mapView.getAllLayers()) {
    71                 if (layer instanceof GpxLayer) {
     72                if (layer instanceof GpxLayer || layer instanceof MarkerLayer) {
    7273                    return true;
    7374                }
Note: See TracChangeset for help on using the changeset viewer.