Skip to content

Commit

Permalink
fix for #2482 deadlock on PDF import (#2517)
Browse files Browse the repository at this point in the history
+ Caused by attempt to update UI on multiple threads
  • Loading branch information
paulsputer authored and Siedlerchr committed Feb 4, 2017
1 parent c517c6f commit 9738afc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/net/sf/jabref/pdfimport/PdfImporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ private void doContentImport(String fileName, List<BibEntry> res) {
Globals.prefs.getBibtexKeyPatternPreferences());
DroppedFileHandler dfh = new DroppedFileHandler(frame, panel);
dfh.linkPdfToEntry(fileName, entry);
panel.highlightEntry(entry);

SwingUtilities.invokeLater(() -> panel.highlightEntry(entry));

if (Globals.prefs.getBoolean(JabRefPreferences.AUTO_OPEN_FORM)) {
EntryEditor editor = panel.getEntryEditor(entry);
panel.showEntryEditor(editor);
Expand Down

0 comments on commit 9738afc

Please sign in to comment.