Ticket #19196: 19196.3.patch
File 19196.3.patch, 1.3 KB (added by , 5 years ago) |
---|
-
src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
49 49 50 50 private static final class MapPaintStylesPreferenceListener implements PreferenceChangedListener { 51 51 private final IPreferences pref; 52 /** Preferences to ignore (i.e., if they change, don't reload) */ 53 private final List<String> preferenceIgnoreList; 52 54 53 55 MapPaintStylesPreferenceListener(IPreferences pref) { 54 56 this.pref = pref; 57 this.preferenceIgnoreList = Arrays.asList("mappaint.style.entries", "mappaint.style.known-defaults"); 55 58 } 56 59 57 60 @Override 58 61 public void preferenceChanged(PreferenceChangeEvent e) { 59 if (e.getKey().contains("mappaint") ) {62 if (e.getKey().contains("mappaint") && !this.preferenceIgnoreList.contains(e.getKey())) { 60 63 // We need to remove this from the listeners, so that we don't recursively call ourselves. 61 64 pref.removePreferenceChangeListener(this); 62 65 MapPaintStyles.readFromPreferences();