X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fsnippets%2Fhighlevelstatehandlers%2Fstandard%2Fsubcomponent%2FDelegatingSubcomponentHighLevelStateHandler.java;h=bc864d1e53965ecf2b182007da499b631a34f115;hb=aac2d4e0bee577b743c036953cf2c12c84c03b71;hp=79ec244d58ea7a92692f33f498d2b97cd2498deb;hpb=74f82a58865d948fa700efbc185a8d057e4a0175;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java index 79ec244d..bc864d1e 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java @@ -40,7 +40,7 @@ public class DelegatingSubcomponentHighLevelStateHandler implements Subcomponent { if (delegateTarget == null) this.delegateTarget = parentComponent; - else if (!parentComponent.submodel.getComponentsByName().containsValue(delegateTarget)) + else if (parentComponent.submodel.getComponentsByName().get(delegateTarget.name) != delegateTarget) throw new IllegalArgumentException( "Can only set components belonging to the submodel of the parent component of this handler as the delegate target"); this.delegateTarget = delegateTarget;