Changeset 5478 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2012-08-26T17:16:50+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #7999 - Change r5464 broke display of texts for marker layer

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/CachedProperty.java

    r5464 r5478  
    1212    private int updateCount;
    1313
    14     protected CachedProperty(String key, T defaultValue, String defaultValueAsString) {
    15         super(key, defaultValue);
     14    protected CachedProperty(String key, String defaultValueAsString) {
     15        super(key, null);
    1616        Main.pref.addPreferenceChangeListener(this);
    1717        this.defaultValueAsString = defaultValueAsString;
     
    5050        return updateCount;
    5151    }
     52   
     53    @Override
     54    public T getDefaultValue() {
     55        return fromString(getDefaultValueAsString());
     56    }
    5257
    5358    public String getDefaultValueAsString() {
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r5464 r5478  
    4949 * will create AudioMarkers for .wav files, ImageMarkers for .png/.jpg/.jpeg
    5050 * files, and WebMarkers for everything else. (The creation of a WebMarker will
    51  * fail if there's no vaild URL in the <link> tag, so it might still make sense
     51 * fail if there's no valid URL in the <link> tag, so it might still make sense
    5252 * to add Makers for such waypoints at the end of the list.)
    5353 *
     
    7777        // will make gui for it so I'm keeping it here
    7878
    79         private final static Map<String, TemplateEntryProperty> cache = new HashMap<String, Marker.TemplateEntryProperty>();
     79        private final static Map<String, TemplateEntryProperty> cache = new HashMap<String, TemplateEntryProperty>();
    8080
    8181        // Legacy code - convert label from int to template engine expression
     
    137137
    138138        private TemplateEntryProperty(String key, String defaultValue, TemplateEntryProperty parent) throws ParseError {
    139             super(key, new TemplateParser(defaultValue).parse(), defaultValue);
     139            super(key, defaultValue);
    140140            this.parent = parent;
    141141            updateValue(); // Needs to be called because parent wasn't know in super constructor
Note: See TracChangeset for help on using the changeset viewer.