Skip to content

Commit a656aab

Browse files
committed
fixing the startup sequence with new splash
1 parent 8fceda4 commit a656aab

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/BowlerStudio.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ public void start(Stage primaryStage) {
810810

811811
}
812812
com.neuronrobotics.sdk.common.Log.error("Class loader: " + Thread.currentThread().getContextClassLoader());
813-
new Thread(() -> {
813+
//new Thread(() -> {
814814
Thread.currentThread().setUncaughtExceptionHandler(new IssueReportingExceptionHandler());
815815

816816
try {
@@ -860,18 +860,13 @@ public void start(Stage primaryStage) {
860860
});
861861
} catch (Exception e) {
862862
reporter.uncaughtException(Thread.currentThread(), e);
863+
System.exit(5);
863864

864865
}
865866
renderSplashFrame(96, "UI Launch...");
866867

867868
Parent root = mainControllerPanel.getRoot();
868-
FontSizeManager.addListener(fontNum->{
869-
BowlerStudioController bowlerStudio = BowlerStudioController.getBowlerStudio();
870-
bowlerStudio.setFontSize(fontNum);
871-
double tmp = FontSizeManager.getImageScale()*9;
872869

873-
root.setStyle("-fx-font-size: "+((int)tmp)+"pt");
874-
});
875870

876871
double sw = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice()
877872
.getDisplayMode().getWidth();
@@ -915,6 +910,13 @@ public void start(Stage primaryStage) {
915910
// this must be called after the primary stage is shown
916911
// https://bugs.openjdk.java.net/browse/JDK-8132900
917912
DockPane.initializeDefaultUserAgentStylesheet();
913+
FontSizeManager.addListener(fontNum->{
914+
BowlerStudioController bowlerStudio = BowlerStudioController.getBowlerStudio();
915+
bowlerStudio.setFontSize(fontNum);
916+
double tmp = FontSizeManager.getImageScale()*9;
917+
918+
root.setStyle("-fx-font-size: "+((int)tmp)+"pt");
919+
});
918920
});
919921

920922
primaryStage.setOnCloseRequest(arg0 -> {
@@ -974,7 +976,7 @@ public void onDeviceRemoved(BowlerAbstractDevice arg0) {
974976
reporter.uncaughtException(Thread.currentThread(), e);
975977

976978
}
977-
}).start();
979+
//}).start();
978980

979981
}
980982

src/main/java/com/neuronrobotics/bowlerstudio/SplashManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public static void renderSplashFrame(int frame, String message) {
5454
PsudoSplash.get().setMessage(string);
5555
updateSplash();
5656

57-
if (Platform.isFxApplicationThread())
58-
throw new RuntimeException("Splash manager can not be opened from a javafx thread!");
57+
// if (Platform.isFxApplicationThread())
58+
// throw new RuntimeException("Splash manager can not be opened from a javafx thread!");
5959
int index=0;
6060
while(!SplashManager.isVisableSplash()) {
6161
System.out.println("Waiting for splash to open before moving on");

0 commit comments

Comments
 (0)