Changeset 15731 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss
- Timestamp:
- 2020-01-19T17:33:40+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r15717 r15731 49 49 import org.openstreetmap.josm.gui.mappaint.StyleKeys; 50 50 import org.openstreetmap.josm.gui.mappaint.StyleSetting; 51 import org.openstreetmap.josm.gui.mappaint.StyleSetting.BooleanStyleSetting;52 51 import org.openstreetmap.josm.gui.mappaint.StyleSetting.StyleSettingGroup; 52 import org.openstreetmap.josm.gui.mappaint.StyleSettingFactory; 53 53 import org.openstreetmap.josm.gui.mappaint.StyleSource; 54 54 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.KeyCondition; … … 624 624 } 625 625 Cascade c = e.getValue(); 626 String type = c.get("type", null, String.class); 627 StyleSetting set = null; 628 if ("boolean".equals(type)) { 629 set = BooleanStyleSetting.create(c, this, e.getKey()); 630 } else { 631 Logging.warn("Unknown setting type: {0}", type); 632 } 626 StyleSetting set = StyleSettingFactory.create(c, this, e.getKey()); 633 627 if (set != null) { 634 628 settings.add(set); … … 636 630 String groupId = c.get("group", null, String.class); 637 631 if (groupId != null) { 638 settingGroups.get(settingGroups.keySet().stream().filter(g -> g.key.equals(groupId)).findAny() 639 .orElseThrow(() -> new IllegalArgumentException("Unknown settings group: " + groupId))).add(set); 632 final StyleSettingGroup group = settingGroups.keySet().stream() 633 .filter(g -> g.key.equals(groupId)) 634 .findAny() 635 .orElseThrow(() -> new IllegalArgumentException("Unknown settings group: " + groupId)); 636 settingGroups.get(group).add(set); 640 637 } 641 638 }
Note:
See TracChangeset
for help on using the changeset viewer.