Changeset 6034 in josm
- Timestamp:
- 2013-06-27T01:36:33+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java
r5927 r6034 15 15 import org.openstreetmap.josm.gui.dialogs.MapPaintDialog; 16 16 import org.openstreetmap.josm.gui.dialogs.MapPaintDialog.LaunchMapPaintPreferencesAction; 17 import org.openstreetmap.josm.gui.layer.GpxLayer; 18 import org.openstreetmap.josm.gui.layer.Layer; 17 19 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.MapPaintSylesUpdateListener; 18 20 import org.openstreetmap.josm.gui.util.StayOpenCheckBoxMenuItem; 19 21 import org.openstreetmap.josm.tools.ImageProvider; 20 22 23 /** 24 * The View -> Map Paint Styles menu 25 * @since 5086 26 */ 21 27 public class MapPaintMenu extends JMenu implements MapPaintSylesUpdateListener { 22 28 … … 58 64 @Override 59 65 public void updateEnabledState() { 60 setEnabled(Main.isDisplayingMapView() && Main.main.getEditLayer() != null); 66 setEnabled(Main.isDisplayingMapView() && (Main.main.getEditLayer() != null || mapHasGpxLayer())); 67 } 68 69 private boolean mapHasGpxLayer() { 70 for (Layer layer : Main.map.mapView.getAllLayers()) { 71 if (layer instanceof GpxLayer) { 72 return true; 73 } 74 } 75 return false; 61 76 } 62 77 } … … 69 84 }; 70 85 86 /** 87 * Constructs a new {@code MapPaintMenu} 88 */ 71 89 public MapPaintMenu() { 72 90 super(tr("Map Paint Styles"));
Note:
See TracChangeset
for help on using the changeset viewer.