projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a bug in DelegatingSubcomponentHighLevelStateHandler
[Mograsim.git]
/
plugins
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
snippets
/
highlevelstatehandlers
/
standard
/
subcomponent
/
DelegatingSubcomponentHighLevelStateHandler.java
diff --git
a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
index
6557787
..
a7f2c81
100644
(file)
--- a/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
+++ b/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/snippets/highlevelstatehandlers/standard/subcomponent/DelegatingSubcomponentHighLevelStateHandler.java
@@
-54,9
+54,10
@@
public class DelegatingSubcomponentHighLevelStateHandler implements Subcomponent
{
if (delegateTarget == null)
this.delegateTarget = parentComponent;
{
if (delegateTarget == null)
this.delegateTarget = parentComponent;
- else if (parentComponent.submodel.getComponentsByName().get(delegateTarget.getName()) != delegateTarget)
+ else if (delegateTarget != parentComponent
+ && parentComponent.submodel.getComponentsByName().get(delegateTarget.getName()) != delegateTarget)
throw new IllegalArgumentException(
throw new IllegalArgumentException(
- "Can only set components belonging to the submodel of the parent component of this handler as the delegate target");
+ "Can only set components belonging to the submodel of the parent component of this handler
or the parent component itself
as the delegate target");
this.delegateTarget = delegateTarget;
}
this.delegateTarget = delegateTarget;
}