From f642771d119bc361d3df49a458772d2a64f1bbe1 Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Mon, 31 Jul 2017 20:52:31 +0200 Subject: [PATCH] Fixed #124 - reset full legend on export stage close --- .../budgetmaster/ui/ExportChartController.java | 8 ++++++++ src/de/deadlocker8/budgetmaster/ui/ExportChartGUI.fxml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/de/deadlocker8/budgetmaster/ui/ExportChartController.java b/src/de/deadlocker8/budgetmaster/ui/ExportChartController.java index 2815dc0a7..d33e8612a 100644 --- a/src/de/deadlocker8/budgetmaster/ui/ExportChartController.java +++ b/src/de/deadlocker8/budgetmaster/ui/ExportChartController.java @@ -55,6 +55,13 @@ public class ExportChartController { labelSavePath.setText(savePath.getAbsolutePath()); } + + stage.setOnCloseRequest((event)->{ + controller.chartCategoriesShow(false); + }); + + textFieldWidth.setText(String.valueOf((int)chart.getWidth())); + textFieldHeight.setText(String.valueOf((int)chart.getHeight())); anchorPaneMain.setStyle("-fx-background-color: #F4F4F4;"); @@ -238,5 +245,6 @@ public class ExportChartController public void cancel() { stage.close(); + controller.chartCategoriesShow(false); } } \ No newline at end of file diff --git a/src/de/deadlocker8/budgetmaster/ui/ExportChartGUI.fxml b/src/de/deadlocker8/budgetmaster/ui/ExportChartGUI.fxml index f65888dba..2cf04b071 100644 --- a/src/de/deadlocker8/budgetmaster/ui/ExportChartGUI.fxml +++ b/src/de/deadlocker8/budgetmaster/ui/ExportChartGUI.fxml @@ -9,7 +9,7 @@ <?import javafx.scene.layout.VBox?> <?import javafx.scene.text.Font?> -<AnchorPane fx:id="anchorPaneMain" prefHeight="200.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.deadlocker8.budgetmaster.ui.ExportChartController"> +<AnchorPane fx:id="anchorPaneMain" prefHeight="200.0" prefWidth="450.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.deadlocker8.budgetmaster.ui.ExportChartController"> <children> <VBox AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0"> <children> -- GitLab