Problem with multi-connection on block in LD fixed
authorlbessard
Fri, 05 Sep 2008 18:11:52 +0200
changeset 241 3475e76e0672
parent 240 992ae3f46fa1
child 242 fc6d1988e4da
Problem with multi-connection on block in LD fixed
plugins/svgui/svgui.py
--- a/plugins/svgui/svgui.py	Fri Sep 05 16:27:43 2008 +0200
+++ b/plugins/svgui/svgui.py	Fri Sep 05 18:11:52 2008 +0200
@@ -259,10 +259,10 @@
                 generator.ComputedBlocks[block] = True
                 for num, variable in enumerate(block.inputVariables.getvariable()):
                     connections = variable.connectionPointIn.getconnections()
-                    input_info = (generator.TagName, "block", block.getlocalId(), "input", num)
-                    if connections and len(connections) == 1:
+                    if connections is not None:
+                        input_info = (generator.TagName, "block", block.getlocalId(), "input", num)
                         parameter = "%sQ%s%s.%d.%d"%("%", TYPECONVERSION[block_infos["inputs"][num][1]], current_location, block_id, num+1)
-                        value = generator.ComputeFBDExpression(body, connections[0])
+                        value = generator.ComputeExpression(body, connections)
                         generator.Program += [(generator.CurrentIndent, ()),
                                               (parameter, input_info),
                                               (" := ", ())]