Changeset 18908 in josm
- Timestamp:
- 2023-12-13T16:54:29+01:00 (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r18907 r18908 918 918 */ 919 919 private void updateMapPaintKnownDefaults() { 920 final String mapPaintStyleEntriesPrefEntry = "mappaint.style.entries"; 920 921 final String url = "url"; 921 922 final String active = "active"; … … 933 934 putList("mappaint.style.known-defaults", knownDefaults); 934 935 936 // If the user hasn't set the entries, don't go through the removal process for potlatch 2. There is an issue 937 // where it may clear all paintstyles (done when the user has never touched the style settings). 938 if (!this.settingsMap.containsKey(mapPaintStyleEntriesPrefEntry)) { 939 return; 940 } 935 941 // Replace potlatch2 in the current style entries, but only if it is enabled. Otherwise, remove it. 936 final List<Map<String, String>> styleEntries = new ArrayList<>(getListOfMaps( "mappaint.style.entries"));942 final List<Map<String, String>> styleEntries = new ArrayList<>(getListOfMaps(mapPaintStyleEntriesPrefEntry)); 937 943 final boolean potlatchEnabled = styleEntries.stream().filter(map -> potlatch2.equals(map.get(url))) 938 944 .anyMatch(map -> Boolean.parseBoolean(map.get(active))); … … 946 952 } 947 953 } 948 putListOfMaps( "mappaint.style.entries", styleEntries.isEmpty() ? null :styleEntries);954 putListOfMaps(mapPaintStyleEntriesPrefEntry, styleEntries); 949 955 } 950 956
Note:
See TracChangeset
for help on using the changeset viewer.