Changeset 15350 in josm for trunk/src/org
- Timestamp:
- 2019-09-14T17:03:53+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java
r15349 r15350 21 21 22 22 import org.openstreetmap.josm.actions.downloadtasks.DownloadTaskList; 23 import org.openstreetmap.josm.data.Bounds;24 23 import org.openstreetmap.josm.data.coor.LatLon; 25 24 import org.openstreetmap.josm.data.osm.DataSet; … … 91 90 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 92 91 if (ds != null) { 93 Collection<Bounds> existing = ds.getDataSourceBounds(); 94 if (existing != null) { 95 double p = LatLon.MAX_SERVER_PRECISION; 96 LatLon min = new LatLon(bounds.getY()+p, bounds.getX()+p); 97 LatLon max = new LatLon(bounds.getY()+bounds.getHeight()-p, bounds.getX()+bounds.getWidth()-p); 98 if (existing.stream().anyMatch(current -> (current.contains(min) && current.contains(max)))) { 99 return; // skip this one, already downloaded 100 } 92 double p = LatLon.MAX_SERVER_PRECISION; 93 LatLon min = new LatLon(bounds.getY()+p, bounds.getX()+p); 94 LatLon max = new LatLon(bounds.getY()+bounds.getHeight()-p, bounds.getX()+bounds.getWidth()-p); 95 if (ds.getDataSourceBounds().stream().anyMatch(current -> (current.contains(min) && current.contains(max)))) { 96 return; // skip this one, already downloaded 101 97 } 102 98 }
Note:
See TracChangeset
for help on using the changeset viewer.