Archived
1
0
Fork 0

Fix bug on close

This commit is contained in:
Ziedelth 2021-12-10 10:35:17 +01:00
parent 8e4d54b70f
commit 0e36273ab9

View file

@ -2,6 +2,7 @@ package fr.univ.lyon1.gui;
import fr.univ.lyon1.common.ServerConfiguration; import fr.univ.lyon1.common.ServerConfiguration;
import javafx.application.Application; import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Group; import javafx.scene.Group;
import javafx.scene.Scene; import javafx.scene.Scene;
@ -46,6 +47,11 @@ public class MainGui extends Application {
System.exit(1); System.exit(1);
} }
} }
stage.setOnCloseRequest(event -> {
Platform.exit();
System.exit(0);
});
} }
private void launchServerConfiguration(Stage stage) throws IOException { private void launchServerConfiguration(Stage stage) throws IOException {