Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 1242)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 1243)
@@ -230,6 +230,6 @@
         if(value != null && value.length() == 0)
             value = null;
-        if(!((oldvalue == null && value == null) || (value != null
-        && oldvalue != null && oldvalue.equals(value))))
+        if(!((oldvalue == null && (value == null || value.equals(defaults.get(key))))
+        || (value != null && oldvalue != null && oldvalue.equals(value))))
         {
             if (value == null)
@@ -237,5 +237,4 @@
             else
                 properties.put(key, value);
-            String s = defaults.get(key);
             save();
             firePreferenceChanged(key, value);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java	(revision 1242)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java	(revision 1243)
@@ -183,9 +183,15 @@
 
     public boolean ok() {
+        Boolean ret = false;
         for (int i = 0; i < colors.getRowCount(); ++i) {
-            Main.pref.putColor((String)colors.getValueAt(i, 0), (Color)colors.getValueAt(i, 1));
+            String key = (String)colors.getValueAt(i, 0);
+            if(Main.pref.putColor(key, (Color)colors.getValueAt(i, 1)))
+            {
+                if(key.startsWith("mappaint."))
+                    ret = true;
+            }
         }
         org.openstreetmap.josm.gui.layer.OsmDataLayer.createHatchTexture();
-        return false;
+        return ret;
     }
 }
