mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-09 12:56:02 -04:00
Adds a button to create a concrete circuit to the code dialog.
This commit is contained in:
parent
e1f58e7594
commit
c1891e1990
@ -1175,7 +1175,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
}
|
||||
}.setToolTip(Lang.get("attr_openCircuit_tt")));
|
||||
}
|
||||
if (elementType == GenericInitCode.DESCRIPTION && getCircuit().getAttributes().get(Keys.IS_GENERIC)) {
|
||||
if ((elementType == GenericInitCode.DESCRIPTION || elementType == GenericCode.DESCRIPTION) && getCircuit().getAttributes().get(Keys.IS_GENERIC)) {
|
||||
attributeDialog.addButton(Lang.get("attr_createConcreteCircuitLabel"), new ToolTipAction(Lang.get("attr_createConcreteCircuit")) {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@ -1187,8 +1187,12 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
modify(checkNetRename(element, modified, mod));
|
||||
}
|
||||
|
||||
ElementAttributes attr = null;
|
||||
if (elementType == GenericInitCode.DESCRIPTION)
|
||||
attr = element.getElementAttributes();
|
||||
|
||||
Circuit concreteCircuit = new ResolveGenerics(getCircuit(), library)
|
||||
.resolveCircuit(element.getElementAttributes())
|
||||
.resolveCircuit(attr)
|
||||
.cleanupConcreteCircuit()
|
||||
.getCircuit();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user