Ticket #19451: 19451.2.patch

File 19451.2.patch, 2.3 KB (added by GerdP, 4 years ago)
  • 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"));
  • src/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskList.java

     
    265265                                + tr("The following errors occurred during mass download: {0}",
    266266                                        Utils.joinAsHtmlUnorderedList(items)) + "</html>",
    267267                                tr("Errors during download"), JOptionPane.ERROR_MESSAGE);
     268                        return;
    268269                    }
    269270                });
    270 
    271                 return;
    272271            }
    273272
    274273            // FIXME: this is a hack. We assume that the user canceled the whole download if at