Skip to content

Commit 8c910ad

Browse files
authored
Merge pull request #268 from suchitalad/xcosblocks
Updated MxGraphParser
2 parents 09b1c02 + 95ed7d5 commit 8c910ad

File tree

4 files changed

+386
-32
lines changed

4 files changed

+386
-32
lines changed

blocks/Xcos/MxGraphParser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def addPort1ForSplit(outroot, splitblockid, sourceVertex2, targetVertex2, source
125125
else:
126126
return addImplicitOutputPortForSplit(outroot, splitblockid, sourceVertex2, targetVertex2, sourceType2, targetType2, inputCount, outputCount, nextattribid, nextAttribForSplit, left_array)
127127
elif sourceType == 'CommandControlLink':
128-
if sourceType2 == 'CommandPort':
128+
if sourceType2 == 'CommandPort' or sourceType2 == 'CommandControlLink':
129129
return addControlPortForSplit(outroot, splitblockid, sourceVertex2, targetVertex2, sourceType2, targetType2, inputCount, outputCount, nextattribid, nextAttribForSplit, left_array)
130130
else:
131131
print('Error: (sourceType, targetType, sourceType2, targetType2) =',
@@ -149,7 +149,7 @@ def addPort2ForSplit(outroot, splitblockid, sourceVertex2, targetVertex2, source
149149
else:
150150
return addImplicitOutputPortForSplit(outroot, splitblockid, sourceVertex2, targetVertex2, sourceType2, targetType2, inputCount, outputCount, nextattribid, nextAttribForSplit, right_array)
151151
elif sourceType == 'CommandControlLink':
152-
if targetType2 == 'ControlPort':
152+
if targetType2 == 'ControlPort' or targetType2 == 'CommandControlLink':
153153
return addCommandPortForSplit(outroot, splitblockid, sourceVertex2, targetVertex2, sourceType2, targetType2, inputCount, outputCount, nextattribid, nextAttribForSplit, right_array)
154154
else:
155155
print('Error: (sourceType, targetType, sourceType2, targetType2) =',
@@ -485,7 +485,7 @@ def addPort3ForSplit(outroot, splitblockid, sourceVertex, targetVertex, sourceTy
485485
split_style = 'SPLIT_f;flip=false;mirror=false'
486486
func_name = 'SPLIT_f'
487487
print('BEFORE Splitblock:', outroot, nextattribid, componentOrdering, geometry, parentattribid, split_style, func_name)
488-
SplitBlock(outroot, nextattribid, componentOrdering, geometry, parent=parentattribid, style=split_style, func_name=func_name)
488+
SplitBlock(outroot, nextattribid, componentOrdering, geometry, [], parent=parentattribid, style=split_style, func_name=func_name)
489489
print('AFTER Splitblock:', outroot, nextattribid, componentOrdering, geometry, parentattribid, split_style, func_name)
490490
splitblockid = nextattribid
491491
nextattribid += 1

0 commit comments

Comments
 (0)