diff --git a/src/de/deadlocker8/budgetmaster/ui/controller/ReportController.java b/src/de/deadlocker8/budgetmaster/ui/controller/ReportController.java index 5b6e202647f8bfac08f35cb5ba04dfff6e2c4d02..5839021d41bf6d3ba0574ec41d11e9ebac81ba96 100644 --- a/src/de/deadlocker8/budgetmaster/ui/controller/ReportController.java +++ b/src/de/deadlocker8/budgetmaster/ui/controller/ReportController.java @@ -77,6 +77,7 @@ public class ReportController implements Refreshable private Controller controller; private ColumnFilter columnFilter; private File reportPath; + private String initialReportPath; public void init(Controller controller) { @@ -528,11 +529,7 @@ public class ReportController implements Refreshable } else { - DateTime currentDate = controller.getCurrentDate(); - String currentMonth = currentDate.toString("MM"); - String currentYear = currentDate.toString("YYYY"); - - fileChooser.setInitialFileName( Localization.getString(Strings.REPORT_INITIAL_FILENAME, currentYear, currentMonth)); + fileChooser.setInitialFileName( Localization.getString(initialReportPath)); } fileChooser.getExtensionFilters().add(extFilter); File file = fileChooser.showSaveDialog(controller.getStage()); @@ -665,5 +662,11 @@ public class ReportController implements Refreshable } refreshTableView(); + + DateTime currentDate = controller.getCurrentDate(); + String currentMonth = currentDate.toString("MM"); + String currentYear = currentDate.toString("YYYY"); + + initialReportPath = Localization.getString(Strings.REPORT_INITIAL_FILENAME, currentYear, currentMonth); } } \ No newline at end of file