Skip to content

Commit da1bb0e

Browse files
committed
Added project dir to directoryfield by default in create new todolist wizard
1 parent ab19047 commit da1bb0e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/main/java/org/ainm/controllers/CreateNewFileDialogController.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ String getFilename() {
2323
return filenameField.getText();
2424
}
2525

26+
void setDirectoryField(String value) {
27+
directoryField.setText(value);
28+
}
29+
2630
void changeExtention(String value) {
2731
extentionLabel.setText(value);
2832
}

src/main/java/org/ainm/controllers/MainController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ void new_todo_list(ActionEvent event) throws IOException {
279279
// Get the control of the dialog
280280
CreateNewFileDialogController createFileDialogController = loader.getController();
281281
createFileDialogController.changeExtention(".todo");
282+
createFileDialogController.setDirectoryField(current_project_path + "/");
282283
Dialog<ButtonType> dialog = new Dialog<>();
283284
dialog.setDialogPane(createNewFileDialog);
284285
dialog.setTitle("Create a new file");

0 commit comments

Comments
 (0)