diff options
author | Wade Brainerd <wadetb@gmail.com> | 2009-12-31 02:32:03 (GMT) |
---|---|---|
committer | Wade Brainerd <wadetb@gmail.com> | 2009-12-31 02:32:03 (GMT) |
commit | 75b89821ed2b2cf543045e6d9bd6e1437ca11521 (patch) | |
tree | c98784dcf8fe5431d35a35ea24bc71e3ba643159 | |
parent | 074df304379db5bd4d733d1a7af3ddd7723d9b05 (diff) |
Fix bug in MoveableObject's overridden move method.
-rw-r--r-- | movableobject.py | 5 | ||||
-rw-r--r-- | objectarea.py | 1 | ||||
-rw-r--r-- | volumeobject.py | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/movableobject.py b/movableobject.py index 9dc6e2b..7b255db 100644 --- a/movableobject.py +++ b/movableobject.py @@ -306,13 +306,14 @@ class MovableObject(Object): # Tentatively place in the object in the new position last_pos = self.pos + self.pos = pos + self.calculate_bounds() # If any point is out of bounds, move object back to last position. if not self.is_in_container(): self.pos = last_pos - - self.calculate_bounds() + self.calculate_bounds() self.queue_draw() diff --git a/objectarea.py b/objectarea.py index 17c5ac0..f734539 100644 --- a/objectarea.py +++ b/objectarea.py @@ -191,6 +191,7 @@ class ObjectArea(gtk.Layout): y1 = int(bounds[0].y * self.scale_ratio)
x2 = int(bounds[1].x * self.scale_ratio)
y2 = int(bounds[1].y * self.scale_ratio)
+
self.queue_draw_area(x1, y1, (x2-x1)+1, (y2-y1)+1)
def clear_selection(self):
diff --git a/volumeobject.py b/volumeobject.py index 37879c6..6682f11 100644 --- a/volumeobject.py +++ b/volumeobject.py @@ -344,7 +344,3 @@ class VolumeObject(MovableObject): def get_bounds(self):
return self.bounds_min, self.bounds_max
-
- def transform_point(self, p):
- return p.rotate(self.angle) + self.pos
-
\ No newline at end of file |