mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 14:31:02 -04:00
Simulation settings are stored in the *.dig file.
This commit is contained in:
parent
c1e4656dda
commit
33288750b1
@ -115,7 +115,6 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
private final ShapeFactory shapeFactory;
|
||||
private final JLabel statusLabel;
|
||||
private final StateManager stateManager = new StateManager();
|
||||
private final ElementAttributes settings = new ElementAttributes();
|
||||
private final ScheduledThreadPoolExecutor timerExecutor = new ScheduledThreadPoolExecutor(1);
|
||||
private final WindowPosManager windowPosManager = new WindowPosManager();
|
||||
private final InsertHistory insertHistory;
|
||||
@ -785,9 +784,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
ToolTipAction editRunAttributes = new ToolTipAction(Lang.get("menu_editRunAttributes")) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
settings.getValuesFrom(
|
||||
new AttributeDialog(Main.this, ATTR_LIST, settings)
|
||||
.showDialog());
|
||||
circuitComponent.editCircuitAttributes(Main.this, ATTR_LIST);
|
||||
}
|
||||
}.setToolTip(Lang.get("menu_editRunAttributes_tt"));
|
||||
|
||||
@ -1000,6 +997,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
doStep.setEnabled(false);
|
||||
runToBreakAction.setEnabled(!realTimeClockRunning && model.isFastRunModel());
|
||||
|
||||
ElementAttributes settings = circuitComponent.getCircuit().getAttributes();
|
||||
List<String> ordering = circuitComponent.getCircuit().getMeasurementOrdering();
|
||||
if (settings.get(Keys.SHOW_DATA_TABLE))
|
||||
windowPosManager.register("probe", new ProbeDialog(this, model, updateEvent, ordering, modelSync)).setVisible(true);
|
||||
@ -1290,6 +1288,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
|
||||
}
|
||||
|
||||
private void setDebug(boolean debug) {
|
||||
ElementAttributes settings = circuitComponent.getCircuit().getAttributes();
|
||||
settings.set(Keys.SHOW_DATA_TABLE, debug);
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,17 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
* @param parent the parent component
|
||||
*/
|
||||
public void editCircuitAttributes(Component parent) {
|
||||
ElementAttributes modifiedAttributes = new AttributeDialog(parent, ATTR_LIST, circuit.getAttributes()).showDialog();
|
||||
editCircuitAttributes(parent, ATTR_LIST);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the attribute editor
|
||||
*
|
||||
* @param parent the parent component
|
||||
* @param attrList the list of keys to edit
|
||||
*/
|
||||
public void editCircuitAttributes(Component parent, java.util.List<Key> attrList) {
|
||||
ElementAttributes modifiedAttributes = new AttributeDialog(parent, attrList, circuit.getAttributes()).showDialog();
|
||||
if (modifiedAttributes != null)
|
||||
modify(new ModifyCircuitAttributes(modifiedAttributes));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user