Ticket #19451: 19451.patch

File 19451.patch, 1.5 KB (added by GerdP, 5 years ago)

only update selectable elements

  • src/org/openstreetmap/josm/actions/UpdateDataAction.java

     
    1212import java.util.stream.Collectors;
    1313
    1414import org.openstreetmap.josm.actions.downloadtasks.DownloadTaskList;
     15import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1516import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1617import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
    1718import org.openstreetmap.josm.io.NetworkManager;
     
    8586                .collect(Collectors.toList());
    8687
    8788        if (areasToDownload.isEmpty()) {
    88             // no bounds defined in the dataset? we update all primitives in the data set using a series of multi fetch requests
    89             UpdateSelectionAction.updatePrimitives(editLayer.data.allPrimitives());
     89            // no bounds defined in the dataset? we update all selectable primitives in the data set using a series of multi fetch requests
     90            UpdateSelectionAction.updatePrimitives(editLayer.data.allPrimitives().stream()
     91                    .filter(OsmPrimitive::isSelectable).collect(Collectors.toList()));
    9092        } else {
    9193            // bounds defined? => use the bbox downloader
    9294            final PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download data"));