Changeset 8741 in josm


Ignore:
Timestamp:
2015-09-10T08:45:02+02:00 (5 years ago)
Author:
simon04
Message:

fix #11846 - MapCSS validator: make ignoring "Whole group" work again

Location:
trunk
Files:
3 edited

Legend:

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

    r8674 r8741  
    656656        public String toString() {
    657657            return base + (Range.ZERO_TO_INFINITY.equals(range) ? "" : range) + Utils.join("", conds)
    658                     + (subpart != null ? "::" + subpart : "");
     658                    + (subpart != null && subpart != Subpart.DEFAULT_SUBPART ? "::" + subpart : "");
    659659        }
    660660    }
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Subpart.java

    r8624 r8741  
    2929            return id;
    3030        }
     31
     32        @Override
     33        public String toString() {
     34            return id;
     35        }
    3136    }
    3237
     
    4752            return Cascade.convertTo(id.evaluate(env), String.class);
    4853        }
     54
     55        @Override
     56        public String toString() {
     57            return String.valueOf(id);
     58        }
    4959    }
    5060}
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java

    r8509 r8741  
    106106        assertThat(errors.size(), is(1));
    107107        assertThat(errors.iterator().next().getMessage(), is("has alt_name but not name"));
     108        assertThat(errors.iterator().next().getIgnoreSubGroup(), is("3000_*[.+_name][!name]"));
    108109    }
    109110
     
    116117        assertThat(errors.size(), is(1));
    117118        assertThat(errors.iterator().next().getMessage(), is("footway used with foot=no"));
     119        assertThat(errors.iterator().next().getIgnoreSubGroup(), is("3000_way[highway=footway][foot]"));
    118120    }
    119121
Note: See TracChangeset for help on using the changeset viewer.