Adding support for contraining move to only one direction when control down
authorlbessard
Wed, 18 Mar 2009 16:09:52 +0100
changeset 329 1cf72cb51dc9
parent 328 500588ea29e8
child 330 d803ba077da0
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 16:04:35 2009 +0100
+++ b/graphics/GraphicCommons.py	Wed Mar 18 16:09:52 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() and self.Handle == HANDLE_MOVE:
+                if event.ControlDown() and self.Handle[0] == HANDLE_MOVE:
                     self.oldPos.x = self.StartPos.x + self.CurrentDrag.x
                     self.oldPos.y = self.StartPos.y + self.CurrentDrag.y
                 else:
@@ -857,7 +857,6 @@
     
     # Move this group of elements
     def Move(self, movex, movey):
-        print self.Pos, self.StartPos
         # Move all the elements of the group
         for element in self.Elements:
             if not isinstance(element, Wire):