Changeset 4090 in josm
- Timestamp:
- 2011-05-20T11:03:51+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java
r4088 r4090 13 13 import javax.swing.SwingUtilities; 14 14 15 import org.openstreetmap.josm.actions.AutoScaleAction; 15 16 import org.openstreetmap.josm.data.osm.DataSet; 16 17 import org.openstreetmap.josm.data.osm.DataSetMerger; … … 84 85 public void run() { 85 86 layer.mergeFrom(ds); 87 AutoScaleAction.zoomTo(ds.allPrimitives()); 86 88 layer.onPostDownloadFromServer(); 87 89 } … … 140 142 DataSetMerger merger = new DataSetMerger(ds, theirDataSet); 141 143 merger.merge(); 144 145 // if incomplete relation members exist, download them too 146 for (Relation r : ds.getRelations()) { 147 if (canceled) return; 148 if (r.hasIncompleteMembers()) { 149 synchronized(this) { 150 if (canceled) return; 151 objectReader = new OsmServerObjectReader(r.getId(), OsmPrimitiveType.RELATION, true /* full */); 152 } 153 theirDataSet = objectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 154 synchronized (this) { 155 objectReader = null; 156 } 157 merger = new DataSetMerger(ds, theirDataSet); 158 merger.merge(); 159 } 160 } 161 142 162 // a way loaded with MultiFetch may have incomplete nodes because at least one of its 143 163 // nodes isn't present in the local data set. We therefore fully load all
Note:
See TracChangeset
for help on using the changeset viewer.