Skip to content

Commit

Permalink
Open statistics dialog from correct thread
Browse files Browse the repository at this point in the history
The dialog to ask for collecting anonymous statistics needs to be created in
the Swing EDT. Do so using SwingUtilities.invokeLater().

This is a follow-up on 7ef2b3a and should finally fix JabRef#2955.
  • Loading branch information
michaellass committed Oct 6, 2017
1 parent 0a7a718 commit 429b053
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,12 @@ private void initShowTrackingNotification() {

@Override
public void run() {
DefaultTaskExecutor.runInJavaFXThread(JabRefFrame.this::showTrackingNotification);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
DefaultTaskExecutor.runInJavaFXThread(JabRefFrame.this::showTrackingNotification);
}
});
}
}, 60000); // run in one minute
}
Expand Down

0 comments on commit 429b053

Please sign in to comment.