From f5106128a6f944765b0ae454626c4996bd79843d Mon Sep 17 00:00:00 2001 From: Carlos Galindo Date: Wed, 11 Sep 2019 20:08:38 +0200 Subject: [PATCH] Table: fixed name lookup when closing tab --- src/main/java/es/kauron/jstudy/controller/Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/es/kauron/jstudy/controller/Controller.java b/src/main/java/es/kauron/jstudy/controller/Controller.java index caa6979..2b19cb5 100644 --- a/src/main/java/es/kauron/jstudy/controller/Controller.java +++ b/src/main/java/es/kauron/jstudy/controller/Controller.java @@ -206,7 +206,7 @@ public class Controller implements Initializable { tab.setOnCloseRequest(event -> { if (!((TableController) loader.getController()).saved.get()) { 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.getButtonTypes().clear(); dialog.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);