Changeset 15827 in josm
- Timestamp:
- 2020-02-08T16:46:49+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
r15784 r15827 41 41 import org.openstreetmap.josm.gui.MainApplication; 42 42 import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor; 43 import org.openstreetmap.josm.gui.util.GuiHelper; 43 44 import org.openstreetmap.josm.gui.util.WindowGeometry; 44 45 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; … … 292 293 */ 293 294 Collection<DownloadTask> askWhichTasksToLoad(final Collection<DownloadTask> tasks) { 294 final JList<DownloadTask> list = new JList<>(tasks.toArray(new DownloadTask[0])); 295 list.addSelectionInterval(0, tasks.size() - 1); 296 final ExtendedDialog dialog = new WhichTasksToPerformDialog(list); 297 dialog.showDialog(); 298 return dialog.getValue() == 1 ? list.getSelectedValuesList() : Collections.<DownloadTask>emptyList(); 295 return GuiHelper.runInEDTAndWaitAndReturn(() -> { 296 final JList<DownloadTask> list = new JList<>(tasks.toArray(new DownloadTask[0])); 297 list.addSelectionInterval(0, tasks.size() - 1); 298 final ExtendedDialog dialog = new WhichTasksToPerformDialog(list); 299 dialog.showDialog(); 300 return dialog.getValue() == 1 ? list.getSelectedValuesList() : Collections.<DownloadTask>emptyList(); 301 }); 299 302 } 300 303
Note:
See TracChangeset
for help on using the changeset viewer.