Adding support for contraining move to only one direction when control down
authorlbessard
Wed, 18 Mar 2009 16:04:35 +0100
changeset 328 500588ea29e8
parent 327 7fd5233ce5ce
child 329 1cf72cb51dc9
Adding support for contraining move to only one direction when control down
Refreshing bug when aligning two block connected to the same wire fixed
graphics/GraphicCommons.py
--- a/graphics/GraphicCommons.py	Wed Mar 18 15:56:45 2009 +0100
+++ b/graphics/GraphicCommons.py	Wed Mar 18 16:04:35 2009 +0100
@@ -534,7 +534,7 @@
             # If a dragging have been initiated, refreshes the element state
             if self.Dragging:
                 dragx, dragy = self.ProcessDragging(movex, movey, event, scaling)
-                if event.ControlDown():
+                if event.ControlDown() and self.Handle == HANDLE_MOVE:
                     self.oldPos.x = self.StartPos.x + self.CurrentDrag.x
                     self.oldPos.y = self.StartPos.y + self.CurrentDrag.y
                 else: