Skip to content
Snippets Groups Projects
Commit 2e4beb41 authored by Minh Hiep Pham's avatar Minh Hiep Pham :speech_balloon:
Browse files

updated addSwallowedTGComponent method in TMLCCompositeComponent in case that...

updated addSwallowedTGComponent method in TMLCCompositeComponent in case that tgc is a primitive port
parent ffb0e942
No related branches found
No related tags found
1 merge request!123Issue 188: attach primitive port into primitive component starting at third level
...@@ -290,6 +290,24 @@ public class TMLCCompositeComponent extends TGCScalableWithInternalComponent imp ...@@ -290,6 +290,24 @@ public class TMLCCompositeComponent extends TGCScalableWithInternalComponent imp
} }
} }
} }
//issue 188 : attach primitive port into primitive component starting at the third level
if ((!swallowed) && (tgc instanceof TMLCPrimitivePort)) {
List<TMLCPrimitiveComponent> pcList = getAllPrimitiveComponents();
for(TMLCPrimitiveComponent tmlpc : pcList) {
if(((SwallowTGComponent)tmlpc).acceptSwallowedTGComponent(tgc)) {
if(tmlpc.isOnMe(x,y) != null) {
swallowed = true;
((SwallowTGComponent)tmlpc).addSwallowedTGComponent(tgc, x, y);
break;
}
}
}
if (swallowed) {
return true;
}
}
//------------
if (swallowed) { if (swallowed) {
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment