Modified:
trunk/trunk/GUI/gblayout.py
Log:
fixing a bug introduced in the previous commit
Modified: trunk/trunk/GUI/gblayout.py
==============================================================================
--- trunk/trunk/GUI/gblayout.py (original)
+++ trunk/trunk/GUI/gblayout.py Sat Feb 21 11:47:25 2009
@@ -107,7 +107,8 @@
if self.legal_coords(coords):
if self.selected is None:
self.selected =
self.get_element_at_point(coords[0], coords[1])
- self.object_offset =
(coords[0]-self.selected.x, coords[1] - self.selected.y)
+ if self.selected is not None:
+ self.object_offset =
(coords[0]-self.selected.x, coords[1] - self.selected.y)
else:
self.selected = None