--- a/graphics/SFC_Objects.py Mon Dec 10 15:52:49 2007 +0100
+++ b/graphics/SFC_Objects.py Wed Dec 26 16:38:09 2007 +0100
@@ -369,21 +369,24 @@
def ProcessDragging(self, movex, movey):
handle_type, handle = self.Handle
if handle_type == HANDLE_MOVE:
+ movex = max(-self.BoundingBox.x, movex)
+ movey = max(-self.BoundingBox.y, movey)
action_block = None
if self.Parent.GetDrawingMode() == FREEDRAWING_MODE:
self.Move(movex, movey)
self.RefreshConnected()
- return True, True
+ return movex, movey
elif self.Initial:
self.MoveActionBlock((movex, movey))
self.Move(movex, movey, self.Parent.Wires)
self.RefreshOutputPosition((movex, movey))
+ return movex, movey
else:
self.MoveActionBlock((movex, 0))
self.Move(movex, 0)
self.RefreshInputPosition()
self.RefreshOutputPosition()
- return True, False
+ return movex, 0
else:
return Graphic_Element.ProcessDragging(self, movex, movey)
@@ -719,10 +722,11 @@
# Refreshes the transition state according to move defined and handle selected
def ProcessDragging(self, movex, movey):
if self.Parent.GetDrawingMode() != FREEDRAWING_MODE:
+ movex = max(-self.BoundingBox.x, movex)
self.Move(movex, 0)
self.RefreshInputPosition()
self.RefreshOutputPosition()
- return True, False
+ return movex, 0
else:
return Graphic_Element.ProcessDragging(self, movex, movey)
@@ -1132,13 +1136,14 @@
handle_type, handle = self.Handle
# A connector has been handled
if handle_type == HANDLE_CONNECTOR:
+ movex = max(-self.BoundingBox.x, movex)
self.MoveConnector(handle, movex)
if self.Parent.GetDrawingMode() != FREEDRAWING_MODE:
self.RefreshConnectedPosition(handle)
- return True, False
+ return movex, 0
elif self.Parent.GetDrawingMode() == FREEDRAWING_MODE:
return Graphic_Element.ProcessDragging(self, movex, movey)
- return False, False
+ return 0, 0
# Refresh output element model
def RefreshOutputModel(self, move=False):
@@ -1316,9 +1321,10 @@
# Refreshes the jump state according to move defined and handle selected
def ProcessDragging(self, movex, movey):
if self.Parent.GetDrawingMode() != FREEDRAWING_MODE:
+ movex = max(-self.BoundingBox.x, movex)
self.Move(movex, 0)
self.RefreshInputPosition()
- return True, False
+ return movex, 0
else:
return Graphic_Element.ProcessDragging(self, movex, movey)
@@ -1505,13 +1511,14 @@
if self.Parent.GetDrawingMode() != FREEDRAWING_MODE:
handle_type, handle = self.Handle
if handle_type == HANDLE_MOVE:
+ movex = max(-self.BoundingBox.x, movex)
wires = self.Input.GetWires()
if len(wires) == 1:
input_pos = wires[0][0].EndConnected.GetPosition(False)
if self.Pos.x - input_pos.x + movex >= SFC_WIRE_MIN_SIZE:
self.Move(movex, 0)
- return True, False
- return False, False
+ return movex, 0
+ return 0, 0
else:
return Graphic_Element.ProcessDragging(self, movex, movey)
else: