Skip to content

Commit

Permalink
Fixes #103 as JDialog will be shown and closed correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonharrer committed Sep 15, 2015
1 parent 7eb8206 commit c1554a0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/main/java/net/sf/jabref/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -1227,13 +1227,16 @@ public void run() {
});
}
};
// FIXME: workaround so that dialog doesn't block run()?
Thread t = new Thread(r);
t.start();
if (diag != null) {
diag.setVisible(true);
}
return t;
SwingUtilities.invokeLater(new Runnable() {

public void run() {
// show dialog which will be hidden when the task is done
if (diag != null) {
diag.setVisible(true);
}
}
});
return r;
}

/**
Expand Down

0 comments on commit c1554a0

Please sign in to comment.