1
0
Fork 0
mirror of https://gitlab.com/kauron/jstudy synced 2024-11-13 15:43:44 +01:00

Table: fixed name lookup when closing tab

This commit is contained in:
Carlos Galindo 2019-09-11 20:08:38 +02:00
parent ce4b58aa4f
commit f5106128a6
Signed by: kauron
GPG key ID: 83E68706DEE119A3

View file

@ -206,7 +206,7 @@ public class Controller implements Initializable {
tab.setOnCloseRequest(event -> { tab.setOnCloseRequest(event -> {
if (!((TableController) loader.getController()).saved.get()) { if (!((TableController) loader.getController()).saved.get()) {
Alert dialog = new Alert(Alert.AlertType.WARNING); Alert dialog = new Alert(Alert.AlertType.WARNING);
dialog.setHeaderText("The tab " + name + " has unsaved information"); dialog.setHeaderText("The tab " + ((TableController) loader.getController()).name + " has unsaved information");
dialog.setContentText("Do you want to save those changes?"); dialog.setContentText("Do you want to save those changes?");
dialog.getButtonTypes().clear(); dialog.getButtonTypes().clear();
dialog.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO, ButtonType.CANCEL); dialog.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);