--- a/graphics/FBD_Objects.py Tue Apr 05 19:06:00 2011 +0200
+++ b/graphics/FBD_Objects.py Tue Apr 05 19:08:22 2011 +0200
@@ -188,19 +188,24 @@
def GetConnectionResultType(self, connector, connectortype):
resulttype = connectortype
+ undefined = True
for input in self.Inputs:
name = input.GetName()
+ undefined = undefined and input.GetType(True) == "ANY"
if input != connector and (name.startswith("IN") or name in ["MN", "MX"]):
inputtype = input.GetConnectedType()
if resulttype is None or inputtype is not None and self.IsOfType(inputtype, resulttype):
resulttype = inputtype
for output in self.Outputs:
name = output.GetName()
+ undefined = undefined and output.GetType(True) == "ANY"
if output != connector and name == "OUT" and not self.IsEndType(output.GetType()):
outputtype = output.GetConnectedType()
if resulttype is None or outputtype is not None and self.IsOfType(outputtype, resulttype):
resulttype = outputtype
- return resulttype
+ if not undefined:
+ return resulttype
+ return "ANY"
# Returns all the block connectors
def GetConnectors(self):