Ignore:
Timestamp:
2012-02-07T21:35:45+01:00 (12 years ago)
Author:
jttt
Message:

access gui in edt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java

    r4748 r4907  
    1919
    2020import javax.swing.JOptionPane;
     21import javax.swing.SwingUtilities;
    2122
    2223import org.openstreetmap.josm.Main;
     
    229230            }
    230231            if (!errors.isEmpty()) {
    231                 StringBuffer sb = new StringBuffer();
     232                final StringBuilder sb = new StringBuilder();
    232233                for (Object error : errors) {
    233234                    if (error instanceof String) {
     
    241242                sb.append("</ul>");
    242243
    243                 JOptionPane.showMessageDialog(Main.parent, "<html>"
    244                         + tr("The following errors occurred during mass download: {0}", sb.toString()) + "</html>",
    245                         tr("Errors during download"), JOptionPane.ERROR_MESSAGE);
     244                SwingUtilities.invokeLater(new Runnable() {
     245                    @Override
     246                    public void run() {
     247                        JOptionPane.showMessageDialog(Main.parent, "<html>"
     248                                + tr("The following errors occurred during mass download: {0}", sb.toString()) + "</html>",
     249                                tr("Errors during download"), JOptionPane.ERROR_MESSAGE);
     250                    }
     251                });
     252
    246253                return;
    247254            }
Note: See TracChangeset for help on using the changeset viewer.