--- a/graphics/FBD_Objects.py Tue Oct 02 18:00:13 2007 +0200
+++ b/graphics/FBD_Objects.py Tue Oct 02 18:07:59 2007 +0200
@@ -138,8 +138,12 @@
def GetInputTypes(self):
return tuple([input.GetType() for input in self.Inputs])
- def GetConnectionResultType(self, connector):
- resulttype = None
+ def SetOutputValues(self, values):
+ for output in self.Outputs:
+ output.SetValue(values.get(ouput.getName(), None))
+
+ def GetConnectionResultType(self, connector, connectortype):
+ resulttype = connectortype
for input in self.Inputs:
name = input.GetName()
if input != connector and (name.startswith("IN") or name in ["MN", "MX"]):
@@ -478,14 +482,7 @@
# Method called when a RightUp event have been generated
def OnRightUp(self, event, dc, scaling):
- pos = GetScaledEventPosition(event, dc, scaling)
- # Popup the menu with special items for a variable and a connector if it's handled
- connector = self.TestConnector(pos, False)
- if connector:
- self.Handle = (HANDLE_CONNECTOR, connector)
- self.Parent.PopupVariableMenu(connector)
- else:
- self.Parent.PopupVariableMenu()
+ self.Parent.PopupDefaultMenu()
# Refreshes the variable model
def RefreshModel(self, move=True):