--- a/graphics/FBD_Objects.py Wed Aug 27 16:55:16 2008 +0200
+++ b/graphics/FBD_Objects.py Wed Aug 27 16:56:25 2008 +0200
@@ -198,14 +198,14 @@
return {"inputs" : self.Inputs, "outputs" : self.Outputs}
# Test if point given is on one of the block connectors
- def TestConnector(self, pt, exclude = True):
+ def TestConnector(self, pt, direction = None, exclude = True):
# Test each input connector
for input in self.Inputs:
- if input.TestPoint(pt, exclude):
+ if input.TestPoint(pt, direction, exclude):
return input
# Test each output connector
for output in self.Outputs:
- if output.TestPoint(pt, exclude):
+ if output.TestPoint(pt, direction, exclude):
return output
return None
@@ -335,7 +335,7 @@
def OnRightUp(self, event, dc, scaling):
pos = GetScaledEventPosition(event, dc, scaling)
# Popup the menu with special items for a block and a connector if one is handled
- connector = self.TestConnector(pos, False)
+ connector = self.TestConnector(pos, exclude=False)
if connector:
self.Handle = (HANDLE_CONNECTOR, connector)
self.Parent.PopupBlockMenu(connector)
@@ -506,10 +506,10 @@
self.Output.MoveConnected(exclude)
# Test if point given is on the variable connector
- def TestConnector(self, pt, exclude=True):
- if self.Input and self.Input.TestPoint(pt, exclude):
+ def TestConnector(self, pt, direction = None, exclude=True):
+ if self.Input and self.Input.TestPoint(pt, direction, exclude):
return self.Input
- if self.Output and self.Output.TestPoint(pt, exclude):
+ if self.Output and self.Output.TestPoint(pt, direction, exclude):
return self.Output
return None
@@ -734,8 +734,8 @@
self.Connector.MoveConnected(exclude)
# Test if point given is on the connection connector
- def TestConnector(self, pt, exclude=True):
- if self.Connector and self.Connector.TestPoint(pt, exclude):
+ def TestConnector(self, pt, direction = None, exclude=True):
+ if self.Connector and self.Connector.TestPoint(pt, direction, exclude):
return self.Connector
return None