X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fcomponents%2Fatomic%2FSimpleRectangularModelGate.java;h=89366013892ec806c46f9293b2deac7292e55e72;hb=8bed58cd47f4e53a0a83e066d38864aa6875502f;hp=f455b3ca638e6b6fe7f4b7367807c5c546fda0ba;hpb=1f645882d229fc3d4081e4c5060559d75dc2cc24;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularModelGate.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularModelGate.java index f455b3ca..89366013 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularModelGate.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularModelGate.java @@ -39,7 +39,13 @@ public class SimpleRectangularModelGate extends ModelComponent protected SimpleRectangularModelGate(LogicModelModifiable model, String id, String label, boolean isInverted, int logicWidth, String name) { - super(model, name); + this(model, id, label, isInverted, logicWidth, name, true); + } + + protected SimpleRectangularModelGate(LogicModelModifiable model, String id, String label, boolean isInverted, int logicWidth, + String name, boolean callInit) + { + super(model, name, false); this.id = id; this.label = label; this.logicWidth = logicWidth; @@ -49,6 +55,9 @@ public class SimpleRectangularModelGate extends ModelComponent addPin(outputPin); this.inputPins = new ArrayList<>(); setInputCount(1); + + if (callInit) + init(); } protected void setInputCount(int inputCount)