- Timestamp:
- 2020-02-03T08:26:24+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
r15811 r15812 19 19 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 20 20 import org.openstreetmap.josm.io.MultiFetchServerObjectReader; 21 import org.openstreetmap.josm.io.OsmServerReader;22 21 import org.openstreetmap.josm.io.OsmTransferException; 23 22 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 35 34 private final Collection<Relation> relations; 36 35 private final OsmDataLayer layer; 37 private OsmServerReader objectReader;36 private MultiFetchServerObjectReader multiObjectReader; 38 37 39 38 /** … … 60 59 canceled = true; 61 60 synchronized (this) { 62 if ( objectReader != null) {63 objectReader.cancel();61 if (multiObjectReader != null) { 62 multiObjectReader.cancel(); 64 63 } 65 64 } … … 80 79 final DataSet allDownloads = new DataSet(); 81 80 getProgressMonitor().setTicksCount(relations.size()); 82 MultiFetchServerObjectReader multiObjectReader;81 DataSet dataSet = null; 83 82 synchronized (this) { 84 83 if (canceled) 85 84 return; 86 85 multiObjectReader = MultiFetchServerObjectReader.create(); 86 multiObjectReader.setRecurseDownRelations(true).setRecurseDownAppended(false); 87 multiObjectReader.append(relations); 88 dataSet = multiObjectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 87 89 } 88 multiObjectReader.setRecurseDownRelations(true).setRecurseDownAppended(false);89 multiObjectReader.append(relations);90 DataSet dataSet = multiObjectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));91 90 if (dataSet == null) 92 91 return;
Note:
See TracChangeset
for help on using the changeset viewer.