Changeset 7280 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2014-07-01T19:23:18+02:00 (10 years ago)
Author:
simon04
Message:

fix #10120 see #10215 - Validator: do not warn "Overlapping Water Areas" for overlaps of water areas with normal areas

File:
1 edited

Legend:

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

    r7169 r7280  
    225225            @Override
    226226            public void visit(Way w) {
    227                 if (e.child == null && left.matches(e.withPrimitive(w))) {
     227                if (e.child == null && left.matches(new Environment().withPrimitive(w))) {
    228228                    if (e.osm instanceof Way && Geometry.PolygonIntersection.CROSSING.equals(Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) {
    229229                        e.child = w;
     
    241241            @Override
    242242            public void visit(Node n) {
    243                 if (e.child == null && left.matches(e.withPrimitive(n))) {
     243                if (e.child == null && left.matches(new Environment().withPrimitive(n))) {
    244244                    if (e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())
    245245                            || e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null)) {
     
    251251            @Override
    252252            public void visit(Way w) {
    253                 if (e.child == null && left.matches(e.withPrimitive(w))) {
     253                if (e.child == null && left.matches(new Environment().withPrimitive(w))) {
    254254                    if (e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))
    255255                            || e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {
     
    284284                    final Relation multipolygon = multipolygons.iterator().next();
    285285                    if (multipolygon == null) throw new NoSuchElementException();
    286                     containsFinder = new ContainsFinder(e.withPrimitive(multipolygon)) {
     286                    containsFinder = new ContainsFinder(new Environment().withPrimitive(multipolygon)) {
    287287                        @Override
    288288                        public boolean isPrimitiveUsable(OsmPrimitive p) {
Note: See TracChangeset for help on using the changeset viewer.