Changeset 9786 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
- Timestamp:
- 2016-02-11T23:37:07+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
r8674 r9786 60 60 @Override 61 61 public void actionPerformed(ActionEvent e) { 62 boolean b = item.isSelected(); 63 if (b == def) { 64 Main.pref.put(prefKey, null); 65 } else { 66 Main.pref.put(prefKey, b); 67 } 62 setValue(item.isSelected()); 68 63 Main.worker.submit(new MapPaintStyles.MapPaintStyleLoader(Arrays.asList(parentStyle))); 69 64 } … … 95 90 return Boolean.valueOf(val); 96 91 } 92 93 public void setValue(Object o) { 94 if (o == null || !(o instanceof Boolean)) { 95 throw new IllegalArgumentException(); 96 } 97 boolean b = (Boolean) o; 98 if (b == def) { 99 Main.pref.put(prefKey, null); 100 } else { 101 Main.pref.put(prefKey, b); 102 } 103 } 97 104 } 98 105 }
Note:
See TracChangeset
for help on using the changeset viewer.