Changeset 12296 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-06-01T16:58:05+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
r12279 r12296 1824 1824 */ 1825 1825 public boolean put(Collection<? extends SourceEntry> entries) { 1826 Collection<Map<String, String>> setting = serializeList(entries); 1827 boolean unset = Main.pref.getListOfStructs(pref, (Collection<Map<String, String>>) null) == null; 1828 if (unset) { 1829 Collection<Map<String, String>> def = serializeList(getDefault()); 1830 if (setting.equals(def)) 1831 return false; 1832 } 1833 return Main.pref.putListOfStructs(pref, setting); 1834 } 1835 1836 private Collection<Map<String, String>> serializeList(Collection<? extends SourceEntry> entries) { 1826 1837 Collection<Map<String, String>> setting = new ArrayList<>(entries.size()); 1827 1838 for (SourceEntry e : entries) { 1828 1839 setting.add(serialize(e)); 1829 1840 } 1830 return Main.pref.putListOfStructs(pref, setting);1841 return setting; 1831 1842 } 1832 1843
Note:
See TracChangeset
for help on using the changeset viewer.