Changeset 5144 in josm for trunk/src/org


Ignore:
Timestamp:
2012-03-31T19:10:28+02:00 (13 years ago)
Author:
Don-vip
Message:

fix #7338 - closed ways with area=no rendered as area

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java

    r3967 r5144  
    166166        String lineIdx = null;
    167167        HashMap<String, LinemodPrototype> overlayMap = new HashMap<String, LinemodPrototype>();
     168        boolean isNotArea = OsmUtils.isFalse(primitive.get("area"));
    168169        for (String key : primitive.keySet()) {
    169170            String val = primitive.get(key);
     
    172173            LinemodPrototype styleLinemod;
    173174            String idx = "n" + key + "=" + val;
    174             if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed)) {
     175            if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
    175176                p.area = update(p.area, styleArea, scale, mc);
    176177            }
     
    187188            }
    188189            idx = "b" + key + "=" + OsmUtils.getNamedOsmBoolean(val);
    189             if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed)) {
     190            if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
    190191                p.area = update(p.area, styleArea, scale, mc);
    191192            }
     
    202203            }
    203204            idx = "x" + key;
    204             if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed)) {
     205            if ((styleArea = areas.get(idx)) != null && (closed || !styleArea.closed) && !isNotArea) {
    205206                p.area = update(p.area, styleArea, scale, mc);
    206207            }
     
    218219        }
    219220        for (AreaPrototype s : areasList) {
    220             if ((closed || !s.closed) && s.check(primitive)) {
     221            if ((closed || !s.closed) && !isNotArea && s.check(primitive)) {
    221222                p.area = update(p.area, s, scale, mc);
    222223            }
Note: See TracChangeset for help on using the changeset viewer.