mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-28 07:28:20 -04:00
fixed some checkstyle issues
This commit is contained in:
parent
0e5c03326a
commit
2b166795ee
@ -65,7 +65,7 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
||||
private static final ArrayList<Key> ATTR_LIST = new ArrayList<>();
|
||||
private static boolean experimental;
|
||||
|
||||
private static File LAST_EXPORT_DIRECTORY;
|
||||
private static File lastExportDirectory;
|
||||
|
||||
/**
|
||||
* @return true if experimental features are enabled
|
||||
@ -920,13 +920,13 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
||||
if (filename != null)
|
||||
fc.setSelectedFile(checkSuffix(filename, suffix));
|
||||
|
||||
if (LAST_EXPORT_DIRECTORY != null)
|
||||
fc.setCurrentDirectory(LAST_EXPORT_DIRECTORY);
|
||||
if (lastExportDirectory != null)
|
||||
fc.setCurrentDirectory(lastExportDirectory);
|
||||
|
||||
fc.addChoosableFileFilter(new FileNameExtensionFilter(name, suffix));
|
||||
if (fc.showSaveDialog(Main.this) == JFileChooser.APPROVE_OPTION) {
|
||||
|
||||
LAST_EXPORT_DIRECTORY=fc.getSelectedFile().getParentFile();
|
||||
lastExportDirectory =fc.getSelectedFile().getParentFile();
|
||||
|
||||
try (OutputStream out = new FileOutputStream(checkSuffix(fc.getSelectedFile(), suffix))) {
|
||||
new Export(circuitComponent.getCircuit(), exportFactory).export(out);
|
||||
|
@ -2,13 +2,11 @@ package de.neemann.digital.gui.components;
|
||||
|
||||
import de.neemann.digital.core.element.ElementAttributes;
|
||||
import de.neemann.digital.core.element.ElementTypeDescription;
|
||||
import de.neemann.digital.core.element.Key;
|
||||
import de.neemann.digital.lang.Lang;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Simple Dialog to show an elements help text.
|
||||
|
Loading…
x
Reference in New Issue
Block a user