--- a/editors/Viewer.py Wed Dec 14 12:36:04 2016 +0300
+++ b/editors/Viewer.py Wed Dec 14 12:44:30 2016 +0300
@@ -887,6 +887,15 @@
comments.sort(lambda x, y: cmp(x.GetId(), y.GetId()))
return blocks + wires + comments
+ def GetContinuationByName(self, name): + for block in self.Blocks.itervalues(): + if isinstance(block, FBD_Connector) and\ + block.GetType() == CONTINUATION and\ + block.GetName() == name: def GetConnectorByName(self, name):
for block in self.Blocks.itervalues():
if isinstance(block, FBD_Connector) and\
--- a/graphics/FBD_Objects.py Wed Dec 14 12:36:04 2016 +0300
+++ b/graphics/FBD_Objects.py Wed Dec 14 12:44:30 2016 +0300
@@ -902,7 +902,15 @@
connectors["outputs"].append(self.Connector)
+ def SpreadCurrent(self): + if self.Type == CONNECTOR: + continuations = self.Parent.GetContinuationByName(self.Name) + if continuations is not None: + value = self.Connector.ReceivingCurrent() + for cont in continuations: + cont.Connector.SpreadCurrent(value) # Changes the variable type