Changeset 7161 in josm


Ignore:
Timestamp:
2014-05-21T23:02:28+02:00 (11 years ago)
Author:
bastiK
Message:

see #9144 - don't match area base selector for primitives with tag area=no

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r7138 r7161  
    5858    public final List<MapCSSRule> rules = new ArrayList<>();
    5959    // rule indices, filtered by primitive type
    60     public final MapCSSRuleIndex nodeRules = new MapCSSRuleIndex();
    61     public final MapCSSRuleIndex wayRules = new MapCSSRuleIndex();
    62     public final MapCSSRuleIndex relationRules = new MapCSSRuleIndex();
    63     public final MapCSSRuleIndex multipolygonRules = new MapCSSRuleIndex();
    64     public final MapCSSRuleIndex canvasRules = new MapCSSRuleIndex();
     60    public final MapCSSRuleIndex nodeRules = new MapCSSRuleIndex();         // nodes
     61    public final MapCSSRuleIndex wayRules = new MapCSSRuleIndex();          // ways without tag area=no
     62    public final MapCSSRuleIndex wayNoAreaRules = new MapCSSRuleIndex();    // ways with tag area=no
     63    public final MapCSSRuleIndex relationRules = new MapCSSRuleIndex();     // relations that are not multipolygon relations
     64    public final MapCSSRuleIndex multipolygonRules = new MapCSSRuleIndex(); // multipolygon relations
     65    public final MapCSSRuleIndex canvasRules = new MapCSSRuleIndex();       // rules to apply canvas properties
    6566
    6667    private Color backgroundColorOverride;
     
    184185        nodeRules.clear();
    185186        wayRules.clear();
     187        wayNoAreaRules.clear();
    186188        relationRules.clear();
    187189        multipolygonRules.clear();
     
    230232                    break;
    231233                case "way":
     234                    wayNoAreaRules.add(optRule);
    232235                    wayRules.add(optRule);
    233236                    break;
     
    243246                    nodeRules.add(optRule);
    244247                    wayRules.add(optRule);
     248                    wayNoAreaRules.add(optRule);
    245249                    relationRules.add(optRule);
    246250                    multipolygonRules.add(optRule);
     
    260264        nodeRules.initIndex();
    261265        wayRules.initIndex();
     266        wayNoAreaRules.initIndex();
    262267        relationRules.initIndex();
    263268        multipolygonRules.initIndex();
     
    359364            matchingRuleIndex = nodeRules;
    360365        } else if (osm instanceof Way) {
    361             matchingRuleIndex = wayRules;
     366            if (osm.isKeyFalse("area")) {
     367                matchingRuleIndex = wayNoAreaRules;
     368            } else {
     369                matchingRuleIndex = wayRules;
     370            }
    362371        } else {
    363372            if (((Relation) osm).isMultipolygon()) {
Note: See TracChangeset for help on using the changeset viewer.