if one tries to SaveAs now and projectpatch i selected, it will op there instead of deafult

This commit is contained in:
Oystein
2021-04-07 07:11:27 +02:00
parent 06397cc6cf
commit 509f5224b5
3 changed files with 8 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ public class MenubarController implements Initializable, Controller {
}
/* ------------------------------------------------------------------------ */
/* OPEN FILE */
/* OPEN FILE/PROJECT */
/* ------------------------------------------------------------------------ */
/**
@@ -148,6 +148,9 @@ public class MenubarController implements Initializable, Controller {
private void handleSaveAsFile() {
FileChooser fc = new FileChooser();
fc.setTitle("Save as");
if (Model.getProjectPath() != null) {
fc.setInitialDirectory(Model.getProjectPath().toFile());
}
Stage stage = (Stage) menubar.getScene().getWindow();
FileChooser.ExtensionFilter extJava = new FileChooser.ExtensionFilter("Java", "*.java");