Changeset 17251 in josm
- Timestamp:
- 2020-10-22T11:30:37+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
r17250 r17251 50 50 import org.openstreetmap.josm.data.osm.Changeset; 51 51 import org.openstreetmap.josm.data.osm.ChangesetCache; 52 import org.openstreetmap.josm.data.osm.ChangesetDataSet;53 52 import org.openstreetmap.josm.data.osm.PrimitiveId; 54 import org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive;55 53 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 56 54 import org.openstreetmap.josm.gui.MainApplication; … … 71 69 import org.openstreetmap.josm.tools.InputMapUtils; 72 70 import org.openstreetmap.josm.tools.Logging; 73 import org.openstreetmap.josm.tools.StreamUtils;74 71 75 72 /** … … 584 581 public void actionPerformed(ActionEvent e) { 585 582 if (!GraphicsEnvironment.isHeadless()) { 586 actDownloadSelectedContent.actionPerformed(e); 583 if (model.getSelectedChangesets().stream().anyMatch(cs -> !cs.hasContent() || cs.isOpen())) 584 actDownloadSelectedContent.actionPerformed(e); 587 585 MainApplication.worker.submit(() -> { 588 586 final List<PrimitiveId> primitiveIds = model.getSelectedChangesets().stream() 589 587 .map(Changeset::getContent) 590 588 .filter(Objects::nonNull) 591 .flatMap(content -> StreamUtils.toStream(content::iterator)) 592 .map(ChangesetDataSet.ChangesetDataSetEntry::getPrimitive) 593 .map(HistoryOsmPrimitive::getPrimitiveId) 589 .flatMap(content -> content.getIds().stream()) 594 590 .distinct() 595 591 .collect(Collectors.toList());
Note:
See TracChangeset
for help on using the changeset viewer.