public void actionPerformed(ActionEvent e) {
if (layer.data.fromServer) {
warnCantImportIntoServerLayer(layer);
return;
}
JpgImporter importer = new JpgImporter(layer);
JFileChooser fc = new JFileChooserManager(true, "geoimage.lastdirectory", Main.pref.get("lastDirectory")).createFileChooser(true, null, importer.filter, JFileChooser.FILES_AND_DIRECTORIES).openFileChooser();
if (fc != null) {
File[] sel = fc.getSelectedFiles();
if (sel != null && sel.length > 0) {
LinkedList<File> files = new LinkedList<>();
addRecursiveFiles(files, sel);
importer.importDataHandleExceptions(files, NullProgressMonitor.INSTANCE);
}
}
}