From 75b89821ed2b2cf543045e6d9bd6e1437ca11521 Mon Sep 17 00:00:00 2001 From: Wade Brainerd Date: Thu, 31 Dec 2009 02:32:03 +0000 Subject: Fix bug in MoveableObject's overridden move method. --- 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 -- cgit v0.9.1