- Timestamp:
- 2011-02-15T18:26:09+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/mappaint
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r3903 r3904 107 107 if (o instanceof Boolean) 108 108 return (Boolean) o; 109 if (o instanceof String) 110 return Boolean.parseBoolean((String) o); 109 if (o instanceof String) { 110 String s = (String) o; 111 if ("true".equals(o) || "yes".equals(o)) 112 return true; 113 if ("false".equals(o) || "no".equals(o)) 114 return false; 115 } 111 116 return null; 112 117 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
r3893 r3904 12 12 import org.openstreetmap.josm.data.osm.Relation; 13 13 import org.openstreetmap.josm.data.osm.Way; 14 import org.openstreetmap.josm.gui.mappaint.Cascade; 14 15 import org.openstreetmap.josm.gui.mappaint.Environment; 15 16 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition.Op; … … 169 170 @Override 170 171 public boolean applies(Environment env) { 171 Object o = e.evaluate(env); 172 if (o instanceof Boolean) 173 return (Boolean) o; 174 return false; 172 Boolean b = Cascade.convertTo(e.evaluate(env), Boolean.class); 173 return b != null && b; 175 174 } 176 175
Note:
See TracChangeset
for help on using the changeset viewer.