fixed a state bug after saving file

This commit is contained in:
hneemann 2016-04-08 19:55:11 +02:00
parent 227bd7d42f
commit 9bc77d7e67
2 changed files with 2 additions and 1 deletions

View File

@ -522,6 +522,7 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
circuitComponent.getCircuit().save(filename);
if (savedListener != null)
savedListener.saved(filename);
elementState.activate();
setFilename(filename, toPrefs);
} catch (IOException e) {
new ErrorMessage(Lang.get("msg_errorWritingFile")).addCause(e).show();

View File

@ -250,7 +250,7 @@ public class CircuitComponent extends JComponent {
if (gr.getMin() != null) {
Vector delta = gr.getMax().sub(gr.getMin());
double sx = ((double) getWidth()) / delta.x * 0.8;
double sx = ((double) getWidth()) / delta.x * 0.75;
double sy = ((double) getHeight()) / delta.y * 0.95;
double s = Math.min(sx, sy);