Changeset 6681 in josm for trunk/src


Ignore:
Timestamp:
2014-01-13T18:58:46+01:00 (10 years ago)
Author:
simon04
Message:

fix #9570 - MapCSS validator: make {0.tag} work for child/parent/spatial selectors

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java

    r6677 r6681  
    259259         */
    260260        static String insertArguments(Selector matchingSelector, String s) {
    261             if (!(matchingSelector instanceof Selector.GeneralSelector) || s == null) {
     261            if (s != null && matchingSelector instanceof Selector.ChildOrParentSelector) {
     262                return  insertArguments(((Selector.ChildOrParentSelector)matchingSelector).right, s);
     263            } else if (s == null || !(matchingSelector instanceof GeneralSelector)) {
    262264                return s;
    263265            }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

    r6680 r6681  
    5757     */
    5858    public static class ChildOrParentSelector implements Selector {
    59         private final Selector left;
    60         private final LinkSelector link;
    61         private final Selector right;
    62         /** true, if this represents a parent selector (otherwise it is a child selector)
    63          */
    64         private final ChildOrParentSelectorType type;
     59        public final Selector left;
     60        public final LinkSelector link;
     61        public final Selector right;
     62        public final ChildOrParentSelectorType type;
    6563
    6664        /**
Note: See TracChangeset for help on using the changeset viewer.