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=c008ad2e6b93de6e381c74e1f4bb4983055eb249;hp=79ec244d58ea7a92692f33f498d2b97cd2498deb;hpb=efc746e205d328bb9a73490f9dff4d56437e10b7;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;