- Timestamp:
- 2015-06-19T19:20:50+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r8470 r8495 1302 1302 * Matches objects within source area ("downloaded area"). 1303 1303 */ 1304 p rivatestatic class InDataSourceArea extends InArea {1304 public static class InDataSourceArea extends InArea { 1305 1305 1306 1306 public InDataSourceArea(boolean all) { … … 1310 1310 @Override 1311 1311 protected Bounds getBounds() { 1312 return new Bounds(Main.main.getCurrentDataSet().getDataSourceArea().getBounds2D()); 1312 return Main.main.getCurrentDataSet() == null || Main.main.getCurrentDataSet().getDataSourceArea() == null 1313 ? null : new Bounds(Main.main.getCurrentDataSet().getDataSourceArea().getBounds2D()); 1313 1314 } 1314 1315 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
r8494 r8495 13 13 14 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.actions.search.SearchCompiler; 15 16 import org.openstreetmap.josm.data.osm.Node; 16 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 467 468 !MultipolygonCache.getInstance().get(Main.map.mapView, (Relation) e.osm).getOpenEnds().isEmpty(); 468 469 } 470 471 private static final Predicate<OsmPrimitive> IN_DOWNLOADED_AREA = new SearchCompiler.InDataSourceArea(false); 472 473 /** 474 * {@code in-downloaded-area} tests whether the object is within source area ("downloaded area"). 475 * @see SearchCompiler.InDataSourceArea 476 */ 477 static boolean inDownloadedArea(Environment e) { 478 return IN_DOWNLOADED_AREA.evaluate(e.osm); 479 } 480 469 481 } 470 482
Note:
See TracChangeset
for help on using the changeset viewer.