* remember default last location as expected

This commit is contained in:
Reinhard Pointner 2014-08-10 07:34:32 +00:00
parent 6d4cbbcdea
commit 58c2f87671
1 changed files with 3 additions and 2 deletions

View File

@ -42,9 +42,10 @@ public class UserFiles {
}
public static List<File> showLoadDialogSelectFiles(boolean folderMode, boolean multiSelection, File defaultFile, ExtensionFileFilter filter, String title, Object parent) {
List<File> files = defaultFileChooser.showLoadDialogSelectFiles(folderMode, multiSelection, getFileChooserDefaultFile(folderMode ? KEY_OPEN_FOLDER : KEY_OPEN_FILE, defaultFile), filter, title, parent);
String defaultFileKey = (folderMode && filter == null) ? KEY_OPEN_FOLDER : KEY_OPEN_FILE;
List<File> files = defaultFileChooser.showLoadDialogSelectFiles(folderMode, multiSelection, getFileChooserDefaultFile(defaultFileKey, defaultFile), filter, title, parent);
if (files.size() > 0) {
setFileChooserDefaultFile(folderMode ? KEY_OPEN_FOLDER : KEY_OPEN_FILE, files.get(0));
setFileChooserDefaultFile(defaultFileKey, files.get(0));
}
return files;
}