Fix bug in FBDBlock when testing types of connections
authorlaurent
Sat, 31 Mar 2012 13:18:13 +0200
changeset 664 02e8c6e882af
parent 663 6ea5c76ea7bc
child 665 6a376615142e
Fix bug in FBDBlock when testing types of connections
graphics/FBD_Objects.py
--- a/graphics/FBD_Objects.py	Sat Mar 31 13:16:44 2012 +0200
+++ b/graphics/FBD_Objects.py	Sat Mar 31 13:18:13 2012 +0200
@@ -203,12 +203,12 @@
             return connectortype
         resulttype = connectortype
         for input in self.Inputs:
-            if input != connector and TestConnectorName(input.GetName(), self.Type):
+            if input != connector and input.GetType(True) == "ANY" and TestConnectorName(input.GetName(), self.Type):
                 inputtype = input.GetConnectedType()
                 if resulttype is None or inputtype is not None and self.IsOfType(inputtype, resulttype):
                     resulttype = inputtype
         for output in self.Outputs:
-            if output != connector and TestConnectorName(output.GetName(), self.Type):
+            if output != connector and output.GetType(True) == "ANY" and TestConnectorName(output.GetName(), self.Type):
                 outputtype = output.GetConnectedType()
                 if resulttype is None or outputtype is not None and self.IsOfType(outputtype, resulttype):
                     resulttype = outputtype