1
0
Fork 0
mirror of https://gitlab.com/kauron/jstudy synced 2024-06-26 13:33:02 +02:00

TableController: save will append extension automagically

This commit is contained in:
Carlos Galindo 2017-06-19 14:29:06 +02:00
parent 5d539485cf
commit ec418ce64e
Signed by: kauron
GPG key ID: 83E68706DEE119A3

View file

@ -78,6 +78,8 @@ public class TableController implements Initializable {
if (AppConfig.lastDir != null) chooser.setInitialDirectory(AppConfig.lastDir);
chooser.setInitialFileName(name);
file = chooser.showSaveDialog(table.getScene().getWindow());
if (!file.getName().endsWith(".jsdb"))
file = new File(file.getPath() + ".jsdb");
if (file != null)
AppConfig.lastDir = file.getParentFile();
}