Skip to content

Commit f86944a

Browse files
authored
Merge pull request #5483 from JabRef/fixnotonfxthread
Fix not on fx thread error for custom entry types
2 parents ba8ce99 + 37d4ca1 commit f86944a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: src/main/java/org/jabref/JabRefGUI.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.util.Iterator;
77
import java.util.List;
88

9+
import javafx.application.Platform;
910
import javafx.scene.Scene;
1011
import javafx.stage.Stage;
1112

@@ -41,12 +42,10 @@ public class JabRefGUI {
4142
private final boolean isBlank;
4243
private final List<ParserResult> failed = new ArrayList<>();
4344
private final List<ParserResult> toOpenTab = new ArrayList<>();
44-
private final JabRefExecutorService executorService;
4545

4646
public JabRefGUI(Stage mainStage, List<ParserResult> databases, boolean isBlank) {
4747
this.bibDatabases = databases;
4848
this.isBlank = isBlank;
49-
executorService = JabRefExecutorService.INSTANCE;
5049
mainFrame = new JabRefFrame(mainStage);
5150

5251
openWindow(mainStage);
@@ -89,8 +88,7 @@ private void openWindow(Stage mainStage) {
8988
event.consume();
9089
}
9190
});
92-
93-
executorService.execute(this::openDatabases);
91+
Platform.runLater(this::openDatabases);
9492
}
9593

9694
private void openDatabases() {
@@ -176,6 +174,7 @@ private void openDatabases() {
176174
for (int i = 0; (i < bibDatabases.size()) && (i < mainFrame.getBasePanelCount()); i++) {
177175
ParserResult pr = bibDatabases.get(i);
178176
BasePanel panel = mainFrame.getBasePanelAt(i);
177+
179178
OpenDatabaseAction.performPostOpenActions(panel, pr);
180179
}
181180

0 commit comments

Comments
 (0)