mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
explicit exit as implicit exit is disabled
This commit is contained in:
@@ -36,6 +36,8 @@ import javafx.stage.WindowEvent;
|
|||||||
import org.springframework.context.annotation.*;
|
import org.springframework.context.annotation.*;
|
||||||
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
||||||
|
|
||||||
|
import static javafx.application.Platform.exit;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan("ninja.javafx")
|
@ComponentScan("ninja.javafx")
|
||||||
@PropertySource(value = "classpath:/ninja/javafx/smartcsv/fx/application.properties")
|
@PropertySource(value = "classpath:/ninja/javafx/smartcsv/fx/application.properties")
|
||||||
@@ -89,6 +91,8 @@ public class SmartCSV extends Application {
|
|||||||
primaryStage.setOnCloseRequest(event -> {
|
primaryStage.setOnCloseRequest(event -> {
|
||||||
if (!smartCVSController.canExit()) {
|
if (!smartCVSController.canExit()) {
|
||||||
event.consume();
|
event.consume();
|
||||||
|
} else {
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user