X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fcomponents%2Fatomic%2FSimpleRectangularHardcodedModelComponent.java;h=8971285a59b48b29fcae1c464b0caf1117bbc4fc;hb=8bed58cd47f4e53a0a83e066d38864aa6875502f;hp=b395695727bc640f45206bf37ab6c057cfac3398;hpb=3a52b6bffe52db5dd5ca907b4b3dfd368a58e14f;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java index b3956957..8971285a 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/SimpleRectangularHardcodedModelComponent.java @@ -40,7 +40,12 @@ public abstract class SimpleRectangularHardcodedModelComponent extends ModelComp public SimpleRectangularHardcodedModelComponent(LogicModelModifiable model, String id, String name, String centerText) { - super(model, name); + this(model, id, name, centerText, true); + } + + public SimpleRectangularHardcodedModelComponent(LogicModelModifiable model, String id, String name, String centerText, boolean callInit) + { + super(model, name, false); this.id = id; this.outlineRenderer = new DefaultOutlineRenderer(this); CenteredTextParams centeredTextParams = new CenteredTextParams(); @@ -79,6 +84,9 @@ public abstract class SimpleRectangularHardcodedModelComponent extends ModelComp recalculate.run(); } }); + + if (callInit) + init(); } // pins