X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=micropeak%2FMicroSave.java;h=9da769144c3b13584916fd829d212478e271d1ae;hb=365eee3ebfe73204033089b363687228f97e5d98;hp=2664f170c375ba2691ffc32490a774c157394b7e;hpb=f20781010a6560b7b359af269c502d098917c446;p=fw%2Faltos diff --git a/micropeak/MicroSave.java b/micropeak/MicroSave.java index 2664f170..9da76914 100644 --- a/micropeak/MicroSave.java +++ b/micropeak/MicroSave.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,8 +25,8 @@ import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.AltosLib.*; -import org.altusmetrum.altosuilib.*; +import org.altusmetrum.altoslib_12.*; +import org.altusmetrum.altosuilib_12.*; public class MicroSave extends JFileChooser { @@ -83,6 +84,7 @@ public class MicroSave extends JFileChooser { } try { save(file, data); + AltosUIPreferences.set_last_logdir(file.getParentFile()); data.set_name(filename); return true; } catch (FileNotFoundException fe) { @@ -101,6 +103,7 @@ public class MicroSave extends JFileChooser { setDialogTitle("Save MicroPeak Data File"); setFileFilter(new FileNameExtensionFilter("MicroPeak data file", "mpd")); - setCurrentDirectory(AltosUIPreferences.logdir()); + setCurrentDirectory(AltosUIPreferences.last_logdir()); + setSelectedFile(MicroFile.make()); } }