Commit 2494bd64 authored by Riegel's avatar Riegel
Browse files

Refactor: Add null handling to output directory selection

parent 2b0f2b0d
......@@ -296,7 +296,14 @@ public class CheckDialog {
outputPathBtn.setOnAction(e -> {
DirectoryChooser directoryChooser = new DirectoryChooser();
outputPathTextField.setText(directoryChooser.showDialog(stage.getOwner()).getAbsolutePath());
directoryChooser.setInitialDirectory(Path.of(Settings.get(Settings.LAST_OPEN_FOLDER)).getParent().toFile());
File f = directoryChooser.showDialog(stage.getOwner());
if (f != null) {
outputPathTextField.setText(f.getAbsolutePath());
Settings.set(Settings.LAST_OPEN_FOLDER, f.getAbsolutePath());
}
});
streamCheckOption.setText(Localization.getText("CheckDialog.streamCheckOption"));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment