Changeset 1243 in josm for trunk/src/org
- Timestamp:
- 2009-01-11T13:14:01+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r1224 r1243 230 230 if(value != null && value.length() == 0) 231 231 value = null; 232 if(!((oldvalue == null && value == null) || (value != null233 && oldvalue != null && oldvalue.equals(value))))232 if(!((oldvalue == null && (value == null || value.equals(defaults.get(key)))) 233 || (value != null && oldvalue != null && oldvalue.equals(value)))) 234 234 { 235 235 if (value == null) … … 237 237 else 238 238 properties.put(key, value); 239 String s = defaults.get(key);240 239 save(); 241 240 firePreferenceChanged(key, value); -
trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java
r1242 r1243 183 183 184 184 public boolean ok() { 185 Boolean ret = false; 185 186 for (int i = 0; i < colors.getRowCount(); ++i) { 186 Main.pref.putColor((String)colors.getValueAt(i, 0), (Color)colors.getValueAt(i, 1)); 187 String key = (String)colors.getValueAt(i, 0); 188 if(Main.pref.putColor(key, (Color)colors.getValueAt(i, 1))) 189 { 190 if(key.startsWith("mappaint.")) 191 ret = true; 192 } 187 193 } 188 194 org.openstreetmap.josm.gui.layer.OsmDataLayer.createHatchTexture(); 189 return false;195 return ret; 190 196 } 191 197 }
Note:
See TracChangeset
for help on using the changeset viewer.