|
6 | 6 | import java.util.Iterator;
|
7 | 7 | import java.util.List;
|
8 | 8 |
|
| 9 | +import javafx.application.Platform; |
9 | 10 | import javafx.scene.Scene;
|
10 | 11 | import javafx.stage.Stage;
|
11 | 12 |
|
@@ -41,12 +42,10 @@ public class JabRefGUI {
|
41 | 42 | private final boolean isBlank;
|
42 | 43 | private final List<ParserResult> failed = new ArrayList<>();
|
43 | 44 | private final List<ParserResult> toOpenTab = new ArrayList<>();
|
44 |
| - private final JabRefExecutorService executorService; |
45 | 45 |
|
46 | 46 | public JabRefGUI(Stage mainStage, List<ParserResult> databases, boolean isBlank) {
|
47 | 47 | this.bibDatabases = databases;
|
48 | 48 | this.isBlank = isBlank;
|
49 |
| - executorService = JabRefExecutorService.INSTANCE; |
50 | 49 | mainFrame = new JabRefFrame(mainStage);
|
51 | 50 |
|
52 | 51 | openWindow(mainStage);
|
@@ -89,8 +88,7 @@ private void openWindow(Stage mainStage) {
|
89 | 88 | event.consume();
|
90 | 89 | }
|
91 | 90 | });
|
92 |
| - |
93 |
| - executorService.execute(this::openDatabases); |
| 91 | + Platform.runLater(this::openDatabases); |
94 | 92 | }
|
95 | 93 |
|
96 | 94 | private void openDatabases() {
|
@@ -176,6 +174,7 @@ private void openDatabases() {
|
176 | 174 | for (int i = 0; (i < bibDatabases.size()) && (i < mainFrame.getBasePanelCount()); i++) {
|
177 | 175 | ParserResult pr = bibDatabases.get(i);
|
178 | 176 | BasePanel panel = mainFrame.getBasePanelAt(i);
|
| 177 | + |
179 | 178 | OpenDatabaseAction.performPostOpenActions(panel, pr);
|
180 | 179 | }
|
181 | 180 |
|
|
0 commit comments