diff --git a/data/validator/combinations.mapcss b/data/validator/combinations.mapcss
index 58809d7..1670223 100644
a
|
b
|
way[highway][natural],
|
258 | 258 | /* see #10471 */ |
259 | 259 | way[waterway] > node[ford?] { set ford_on_waterway; } |
260 | 260 | way[highway] > node[ford?] { set ford_on_highway; } |
261 | | node[ford?]!.ford_on_waterway, node[ford?]!.ford_on_highway { |
| 261 | node[ford?]:indownloadedarea!.ford_on_waterway, node[ford?]:indownloadedarea!.ford_on_highway { |
262 | 262 | throwWarning: tr("{0} should be on the node where {1} and {2} intersect", "ford", "highway", "waterway"); |
263 | 263 | } |
264 | 264 | |
diff --git a/src/org/openstreetmap/josm/actions/search/SearchCompiler.java b/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
index 5e64226..3d06193 100644
a
|
b
|
public class SearchCompiler {
|
1219 | 1219 | /** |
1220 | 1220 | * Matches objects within source area ("downloaded area"). |
1221 | 1221 | */ |
1222 | | private static class InDataSourceArea extends InArea { |
| 1222 | public static class InDataSourceArea extends InArea { |
1223 | 1223 | |
1224 | 1224 | public InDataSourceArea(boolean all) { |
1225 | 1225 | super(all); |
… |
… |
public class SearchCompiler {
|
1227 | 1227 | |
1228 | 1228 | @Override |
1229 | 1229 | protected Bounds getBounds() { |
1230 | | return new Bounds(Main.main.getCurrentDataSet().getDataSourceArea().getBounds2D()); |
| 1230 | return Main.main.getCurrentDataSet() == null || Main.main.getCurrentDataSet().getDataSourceArea() == null |
| 1231 | ? null : new Bounds(Main.main.getCurrentDataSet().getDataSourceArea().getBounds2D()); |
1231 | 1232 | } |
1232 | 1233 | } |
1233 | 1234 | |
diff --git a/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java b/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
index 0b1ec34..3214354 100644
a
|
b
|
import java.util.Set;
|
9 | 9 | import java.util.regex.Pattern; |
10 | 10 | |
11 | 11 | import org.openstreetmap.josm.Main; |
| 12 | import org.openstreetmap.josm.actions.search.SearchCompiler; |
12 | 13 | import org.openstreetmap.josm.data.osm.Node; |
13 | 14 | import org.openstreetmap.josm.data.osm.OsmPrimitive; |
14 | 15 | import org.openstreetmap.josm.data.osm.Relation; |
… |
… |
public abstract class Condition {
|
418 | 419 | case "open_end": |
419 | 420 | // handling at org.openstreetmap.josm.gui.mappaint.mapcss.Selector.ChildOrParentSelector.MultipolygonOpenEndFinder |
420 | 421 | return true; |
| 422 | case "indownloadedarea": |
| 423 | return new SearchCompiler.InDataSourceArea(false).evaluate(e.osm); |
421 | 424 | } |
422 | 425 | return false; |
423 | 426 | } |