Changeset 2942 in josm for trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
- Timestamp:
- 05.02.2010 20:52:53 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
r2711 r2942 2 2 package org.openstreetmap.josm.actions; 3 3 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;6 6 7 7 import java.awt.event.ActionEvent; … … 51 51 return; 52 52 53 int bboxCount = 0;54 53 List<Area> areas = new ArrayList<Area>(); 55 54 for(DataSource ds : getEditLayer().data.dataSources) { 56 areas.add(new Area(ds.bounds. asRect()));55 areas.add(new Area(ds.bounds.getRoundedToOsmPrecision().asRect())); 57 56 } 58 57 … … 73 72 } 74 73 74 List<Area> areasToDownload = new ArrayList<Area>(); 75 75 for(Area a : areas) { 76 76 if(a.isEmpty()) { 77 77 continue; 78 78 } 79 bboxCount++;79 areasToDownload.add(a); 80 80 } 81 81 82 if( bboxCount == 0) {82 if(areasToDownload.isEmpty()) { 83 83 // no bounds defined in the dataset? we update all primitives in the data set 84 84 // using a series of multi fetch requests … … 89 89 // 90 90 final PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download data")); 91 final Future<?> future = new DownloadOsmTaskList().download(false /* no new layer */, areas , monitor);91 final Future<?> future = new DownloadOsmTaskList().download(false /* no new layer */, areasToDownload, monitor); 92 92 Main.worker.submit( 93 93 new Runnable() {
Note: See TracChangeset
for help on using the changeset viewer.
