Open path from last location

- Also some gradle treats :)
This commit is contained in:
Martin Prokoph
2024-08-29 13:43:34 +02:00
parent db32a41e2b
commit 48390abf8f
4 changed files with 6 additions and 5 deletions

View File

@@ -355,7 +355,7 @@ public abstract class MidnightConfig {
} else if (e.selectionMode() > -1) {
ButtonWidget explorerButton = TextIconButtonWidget.builder(Text.empty(),
button -> new Thread(() -> {
JFileChooser fileChooser = new JFileChooser();
JFileChooser fileChooser = new JFileChooser(info.tempValue);
fileChooser.setFileSelectionMode(e.selectionMode()); fileChooser.setDialogType(e.fileChooserType());
fileChooser.setDialogTitle(Text.translatable(translationPrefix + info.field.getName() + ".fileChooser").getString());
if ((e.selectionMode() == JFileChooser.FILES_ONLY || e.selectionMode() == JFileChooser.FILES_AND_DIRECTORIES) && Arrays.stream(e.fileExtensions()).noneMatch("*"::equals))