Changeset 12986 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint
- Timestamp:
- 2017-10-11T20:42:06+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r12809 r12986 8 8 import java.util.List; 9 9 import java.util.NoSuchElementException; 10 import java.util.Objects; 10 11 import java.util.Set; 11 12 import java.util.function.IntFunction; … … 16 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 18 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 19 import org.openstreetmap.josm.data.osm.OsmUtils; 18 20 import org.openstreetmap.josm.data.osm.Relation; 19 21 import org.openstreetmap.josm.data.osm.RelationMember; … … 258 260 259 261 private final class CrossingFinder extends AbstractFinder { 262 263 private final String layer; 264 260 265 private CrossingFinder(Environment e) { 261 266 super(e); 262 267 CheckParameterUtil.ensureThat(e.osm instanceof Way, "Only ways are supported"); 268 layer = OsmUtils.getLayer(e.osm); 263 269 } 264 270 265 271 @Override 266 272 public void visit(Way w) { 267 if (e.child == null && left.matches(new Environment(w).withParent(e.osm)) 273 if (e.child == null && Objects.equals(layer, OsmUtils.getLayer(w)) 274 && left.matches(new Environment(w).withParent(e.osm)) 268 275 && e.osm instanceof Way && Geometry.PolygonIntersection.CROSSING.equals( 269 276 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) {
Note:
See TracChangeset
for help on using the changeset viewer.