Changeset 11553 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java
- Timestamp:
- 2017-02-12T16:32:18+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java
r11452 r11553 6 6 import java.util.Arrays; 7 7 import java.util.Objects; 8 import java.util.Optional; 8 9 9 10 import org.openstreetmap.josm.Main; … … 357 358 if (casingWidth == null) 358 359 return null; 359 width = getWidth(c, WIDTH, getWidth(cDef, WIDTH, null)); 360 if (width == null) { 361 width = 0f; 362 } 363 width += 2 * casingWidth; 360 width = Optional.ofNullable(getWidth(c, WIDTH, getWidth(cDef, WIDTH, null))).orElse(0f) + 2 * casingWidth; 364 361 break; 365 362 case LEFT_CASING: … … 378 375 379 376 /* if we have a "width" tag, try use it */ 380 String widthTag = env.osm.get("width"); 381 if (widthTag == null) { 382 widthTag = env.osm.get("est_width"); 383 } 377 String widthTag = Optional.ofNullable(env.osm.get("width")).orElseGet(() -> env.osm.get("est_width")); 384 378 if (widthTag != null) { 385 379 try {
Note:
See TracChangeset
for help on using the changeset viewer.