1 Index: JabRefFrame.java
2 ===================================================================
3 --- JabRefFrame.java (revision 2498)
4 +++ JabRefFrame.java (working copy)
8 * This method causes all open BasePanels to set up their tables
9 - * anew. When called from PrefsDialog2, this updates to the new
10 + * anew. When called from PrefsDialog3, this updates to the new
13 public void setupAllTables() {
14 @@ -1947,21 +1947,28 @@
15 * @param openInNew Should the entries be imported into a new database?
16 * @param callBack The callback for the ImportInspectionDialog to use.
18 - public void addImportedEntries(final BasePanel panel, final List<BibtexEntry> entries, String filename, boolean openInNew,
19 - ImportInspectionDialog.CallBack callBack) {
20 + public void addImportedEntries(final BasePanel panel, final List<BibtexEntry> entries, String filename,
21 + final boolean openInNew,
22 + final ImportInspectionDialog.CallBack callBack) {
23 // Use the import inspection dialog if it is enabled in preferences, and (there are more than
24 // one entry or the inspection dialog is also enabled for single entries):
25 if (Globals.prefs.getBoolean("useImportInspectionDialog") &&
26 (Globals.prefs.getBoolean("useImportInspectionDialogForSingle") || (entries.size() > 1))) {
27 - ImportInspectionDialog diag = new ImportInspectionDialog(ths, panel,
28 - BibtexFields.DEFAULT_INSPECTION_FIELDS,
29 - Globals.lang("Import"), openInNew);
30 - diag.addEntries(entries);
31 - diag.addCallBack(callBack);
32 - diag.entryListComplete();
33 - Util.placeDialog(diag, ths);
34 - diag.setVisible(true);
37 + SwingUtilities.invokeLater(new Runnable() {
39 + ImportInspectionDialog diag = new ImportInspectionDialog(ths, panel,
40 + BibtexFields.DEFAULT_INSPECTION_FIELDS,
41 + Globals.lang("Import"), openInNew);
42 + diag.addEntries(entries);
43 + diag.addCallBack(callBack);
44 + diag.entryListComplete();
45 + Util.placeDialog(diag, ths);
46 + diag.setVisible(true);
52 ths.addBibEntries(entries, filename, openInNew);
53 if ((panel != null) && (entries.size() == 1)) {