mirror of
https://gitlab.com/kauron/jstudy
synced 2025-01-22 23:05:20 +01:00
TableController: save will append extension automagically
This commit is contained in:
parent
5d539485cf
commit
ec418ce64e
1 changed files with 2 additions and 0 deletions
|
@ -78,6 +78,8 @@ public class TableController implements Initializable {
|
||||||
if (AppConfig.lastDir != null) chooser.setInitialDirectory(AppConfig.lastDir);
|
if (AppConfig.lastDir != null) chooser.setInitialDirectory(AppConfig.lastDir);
|
||||||
chooser.setInitialFileName(name);
|
chooser.setInitialFileName(name);
|
||||||
file = chooser.showSaveDialog(table.getScene().getWindow());
|
file = chooser.showSaveDialog(table.getScene().getWindow());
|
||||||
|
if (!file.getName().endsWith(".jsdb"))
|
||||||
|
file = new File(file.getPath() + ".jsdb");
|
||||||
if (file != null)
|
if (file != null)
|
||||||
AppConfig.lastDir = file.getParentFile();
|
AppConfig.lastDir = file.getParentFile();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue