Skip to content

Commit

Permalink
Open statistics dialog from correct thread (#3272)
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 #2955.
  • Loading branch information
michaellass authored and tobiasdiez committed Oct 7, 2017
1 parent 0a7a718 commit 85363d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 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,9 @@ private void initShowTrackingNotification() {

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

0 comments on commit 85363d0

Please sign in to comment.