Changeset 5149 in josm for trunk/src/org
- Timestamp:
- 2012-04-01T12:03:14+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
r3313 r5149 10 10 11 11 import javax.swing.JOptionPane; 12 import javax.swing.SwingUtilities; 12 13 13 14 import org.openstreetmap.josm.Main; … … 81 82 // 82 83 if (errors.size() == 1) { 83 Object error = errors.iterator().next(); 84 if (error instanceof Exception) { 85 ExceptionDialogUtil.explainException((Exception)error); 86 return; 87 } 88 JOptionPane.showMessageDialog( 89 Main.parent, 90 error.toString(), 91 tr("Error during download"), 92 JOptionPane.ERROR_MESSAGE); 84 final Object error = errors.iterator().next(); 85 SwingUtilities.invokeLater(new Runnable() { 86 @Override 87 public void run() { 88 if (error instanceof Exception) { 89 ExceptionDialogUtil.explainException((Exception)error); 90 } else { 91 JOptionPane.showMessageDialog( 92 Main.parent, 93 error.toString(), 94 tr("Error during download"), 95 JOptionPane.ERROR_MESSAGE); 96 } 97 } 98 }); 93 99 return; 94 95 100 } 96 101 … … 98 103 // 99 104 if (!errors.isEmpty()) { 100 StringBuffer sb = new StringBuffer(); 105 final StringBuffer sb = new StringBuffer(); 101 106 for (Object error:errors) { 102 107 if (error instanceof String) { … … 109 114 sb.append("</ul></html>"); 110 115 111 JOptionPane.showMessageDialog( 112 Main.parent, 113 sb.toString(), 114 tr("Errors during download"), 115 JOptionPane.ERROR_MESSAGE); 116 SwingUtilities.invokeLater(new Runnable() { 117 @Override 118 public void run() { 119 JOptionPane.showMessageDialog( 120 Main.parent, 121 sb.toString(), 122 tr("Errors during download"), 123 JOptionPane.ERROR_MESSAGE); 124 } 125 }); 116 126 return; 117 127 }
Note:
See TracChangeset
for help on using the changeset viewer.