Changeset 16578 in josm


Ignore:
Timestamp:
2020-06-08T21:36:55+02:00 (4 years ago)
Author:
simon04
Message:

see #19196 - Fix unit tests (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java

    r16563 r16578  
    5050    private static final class MapPaintStylesPreferenceListener implements PreferenceChangedListener {
    5151        private final IPreferences pref;
     52        /** Preferences to ignore (i.e., if they change, don't reload) */
     53        private final List<String> preferenceIgnoreList;
    5254
    5355        MapPaintStylesPreferenceListener(IPreferences pref) {
    5456            this.pref = pref;
     57            this.preferenceIgnoreList = Arrays.asList("mappaint.style.entries", "mappaint.style.known-defaults");
    5558        }
    5659
    5760        @Override
    5861        public void preferenceChanged(PreferenceChangeEvent e) {
    59             if (e.getKey().contains("mappaint")) {
     62            if (e.getKey().contains("mappaint") && !this.preferenceIgnoreList.contains(e.getKey())) {
    6063                // We need to remove this from the listeners, so that we don't recursively call ourselves.
    6164                pref.removePreferenceChangeListener(this);
Note: See TracChangeset for help on using the changeset viewer.