Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 12967)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 12968)
@@ -79,16 +79,4 @@
         styleSources = new ArrayList<>();
         Config.getPref().addPreferenceChangeListener(this);
-        MapPaintStyles.addMapPaintSylesUpdateListener(new MapPaintStyles.MapPaintSylesUpdateListener() {
-            //TODO: Listen to wireframe map mode changes.
-            @Override
-            public void mapPaintStylesUpdated() {
-                backgroundColorCache = null;
-            }
-
-            @Override
-            public void mapPaintStyleEntryUpdated(int idx) {
-                mapPaintStylesUpdated();
-            }
-        });
     }
 
@@ -482,4 +470,5 @@
     void clear() {
         styleSources.clear();
+        invalidate();
     }
 
@@ -490,4 +479,5 @@
     void add(StyleSource style) {
         styleSources.add(style);
+        invalidate();
     }
 
@@ -498,5 +488,7 @@
      */
     boolean remove(StyleSource style) {
-        return styleSources.remove(style);
+        boolean result = styleSources.remove(style);
+        invalidate();
+        return result;
     }
 
@@ -508,4 +500,9 @@
         styleSources.clear();
         styleSources.addAll(sources);
+        invalidate();
+    }
+
+    private void invalidate() {
+        backgroundColorCache = null;
     }
 
