Changeset 7139 in josm for trunk/src/org
- Timestamp:
- 2014-05-18T15:31:56+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
r7083 r7139 231 231 }); 232 232 if (i == -1 && !knownDefaults.contains(def.url)) { 233 def.active = false; 233 234 list.add(insertionIdx, def); 234 235 insertionIdx++; … … 263 264 if (josmXml != null) { 264 265 josmXml.title = tr("JOSM default (XML; old version)"); 266 changed = true; 265 267 } 266 268 Main.pref.put("mappaint.style.migration.changedXmlName", true); 267 269 } 268 270 } 271 272 /* Migration code can be removed ~ Nov. 2014 */ 273 if (!Main.pref.getBoolean("mappaint.style.migration.switchedToMapCSS", false)) { 274 SourceEntry josmXml = Utils.find(list, new Predicate<SourceEntry>() { 275 @Override 276 public boolean evaluate(SourceEntry se) { 277 return "resource://styles/standard/elemstyles.xml".equals(se.url); 278 } 279 }); 280 SourceEntry josmMapCSS = Utils.find(list, new Predicate<SourceEntry>() { 281 @Override 282 public boolean evaluate(SourceEntry se) { 283 return "resource://styles/standard/elemstyles.mapcss".equals(se.url); 284 } 285 }); 286 if (josmXml != null && josmMapCSS != null && josmXml.active) { 287 josmMapCSS.active = true; 288 josmXml.active = false; 289 Main.info("Switched mappaint style from XML format to MapCSS (one time migration)."); 290 changed = true; 291 } 292 // in any case, do this check only once: 293 Main.pref.put("mappaint.style.migration.switchedToMapCSS", true); 294 } 269 295 270 296 return changed; … … 274 300 public Collection<ExtendedSourceEntry> getDefault() { 275 301 ExtendedSourceEntry defJosmXml = new ExtendedSourceEntry("elemstyles.xml", "resource://styles/standard/elemstyles.xml"); 276 defJosmXml.active = true;302 defJosmXml.active = false; 277 303 defJosmXml.name = "standard"; 278 304 defJosmXml.title = tr("JOSM default (XML; old version)"); 279 305 defJosmXml.description = tr("Internal style to be used as base for runtime switchable overlay styles"); 280 306 ExtendedSourceEntry defJosmMapcss = new ExtendedSourceEntry("elemstyles.mapcss", "resource://styles/standard/elemstyles.mapcss"); 281 defJosmMapcss.active = false;307 defJosmMapcss.active = true; 282 308 defJosmMapcss.name = "standard"; 283 309 defJosmMapcss.title = tr("JOSM default (MapCSS)");
Note:
See TracChangeset
for help on using the changeset viewer.