Changeset 14747 in josm
- Timestamp:
- 2019-01-27T23:57:47+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r14456 r14747 84 84 String key = "draw.rawgps.layer.wpt.pattern"; 85 85 if (layerName != null) { 86 key += '.' + layerName; 87 } 88 TemplateEntryProperty result = CACHE.get(key); 89 if (result == null) { 90 String defaultValue = layerName == null ? LABEL_PATTERN_AUTO : ""; 91 TemplateEntryProperty parent = layerName == null ? null : forMarker(null); 92 result = new TemplateEntryProperty(key, defaultValue, parent); 93 CACHE.put(key, result); 94 } 95 return result; 86 return CACHE.computeIfAbsent(key + '.' + layerName, k -> new TemplateEntryProperty(k, "", forMarker(null))); 87 } else { 88 return CACHE.computeIfAbsent(key, k -> new TemplateEntryProperty(k, LABEL_PATTERN_AUTO, null)); 89 } 96 90 } 97 91 … … 99 93 String key = "draw.rawgps.layer.audiowpt.pattern"; 100 94 if (layerName != null) { 101 key += '.' + layerName; 102 } 103 TemplateEntryProperty result = CACHE.get(key); 104 if (result == null) { 105 String defaultValue = layerName == null ? "?{ '{name}' | '{desc}' | '{" + Marker.MARKER_FORMATTED_OFFSET + "}' }" : ""; 106 TemplateEntryProperty parent = layerName == null ? null : forAudioMarker(null); 107 result = new TemplateEntryProperty(key, defaultValue, parent); 108 CACHE.put(key, result); 109 } 110 return result; 95 return CACHE.computeIfAbsent(key + '.' + layerName, k -> 96 new TemplateEntryProperty(k, "", forAudioMarker(null))); 97 } else { 98 return CACHE.computeIfAbsent(key, k -> 99 new TemplateEntryProperty(k, "?{ '{name}' | '{desc}' | '{" + MARKER_FORMATTED_OFFSET + "}' }", null)); 100 } 111 101 } 112 102
Note:
See TracChangeset
for help on using the changeset viewer.