Ignore:
Timestamp:
2017-10-12T16:02:15+02:00 (7 years ago)
Author:
bastiK
Message:

see #15410 - change preferences scheme for named colors - makes runtime color name registry obsolete

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java

    r12891 r12987  
    4343import org.openstreetmap.josm.data.gpx.GpxData.GpxDataChangeListener;
    4444import org.openstreetmap.josm.data.gpx.WayPoint;
    45 import org.openstreetmap.josm.data.preferences.ColorProperty;
     45import org.openstreetmap.josm.data.preferences.NamedColorProperty;
    4646import org.openstreetmap.josm.gui.MapView;
    4747import org.openstreetmap.josm.gui.MapViewState;
     
    6969     * @since 10824
    7070     */
    71     public static final ColorProperty DEFAULT_COLOR = new ColorProperty(marktr("gps point"), Color.magenta);
     71    public static final NamedColorProperty DEFAULT_COLOR = new NamedColorProperty(marktr("gps point"), Color.magenta);
    7272
    7373    private final GpxData data;
     
    266266    public Color getColor(String layerName, boolean ignoreCustom) {
    267267        if (ignoreCustom || getColorMode(layerName) == ColorMode.NONE) {
    268             return DEFAULT_COLOR.getChildColor(specName(layerName)).get();
     268            return DEFAULT_COLOR.getChildColor(
     269                    NamedColorProperty.COLOR_CATEGORY_LAYER,
     270                    layerName,
     271                    DEFAULT_COLOR.getName()).get();
    269272        } else {
    270273            return null;
Note: See TracChangeset for help on using the changeset viewer.