From 0b6d6edda6946f8a016711528f3593c63615109f Mon Sep 17 00:00:00 2001 From: Andreas Billmann Date: Wed, 30 Dec 2015 09:51:43 +0100 Subject: [PATCH] explicit exit as implicit exit is disabled --- src/main/java/ninja/javafx/smartcsv/fx/SmartCSV.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/ninja/javafx/smartcsv/fx/SmartCSV.java b/src/main/java/ninja/javafx/smartcsv/fx/SmartCSV.java index 4141791..080e617 100644 --- a/src/main/java/ninja/javafx/smartcsv/fx/SmartCSV.java +++ b/src/main/java/ninja/javafx/smartcsv/fx/SmartCSV.java @@ -36,6 +36,8 @@ import javafx.stage.WindowEvent; import org.springframework.context.annotation.*; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import static javafx.application.Platform.exit; + @Configuration @ComponentScan("ninja.javafx") @PropertySource(value = "classpath:/ninja/javafx/smartcsv/fx/application.properties") @@ -89,6 +91,8 @@ public class SmartCSV extends Application { primaryStage.setOnCloseRequest(event -> { if (!smartCVSController.canExit()) { event.consume(); + } else { + exit(); } }); }