--- a/graphics/GraphicCommons.py Fri Oct 05 18:11:51 2007 +0200
+++ b/graphics/GraphicCommons.py Wed Oct 17 17:50:27 2007 +0200
@@ -497,7 +497,7 @@
height += movey
# Verify that new size is not lesser than minimum
min_width, min_height = self.GetMinSize()
- if width >= min_width and height >= min_height:
+ if width >= min_width and height >= min_height or width >= self.Size[0] and height >= self.Size[1]:
self.Resize(x, y, width, height)
# If it is a move handle, Move this element
elif handle_type == HANDLE_MOVE:
@@ -1103,8 +1103,8 @@
maxx, maxbbxx = max(maxx, self.Points[-1].x), max(maxbbxx, self.Points[-1].x + end_radius)
miny, minbbxy = min(miny, self.Points[-1].y), min(minbbxy, self.Points[-1].y - end_radius)
maxy, maxbbxy = max(maxy, self.Points[-1].y), max(maxbbxy, self.Points[-1].y + end_radius)
- self.Pos = wx.Point(minx, miny)
- self.Size = wx.Size(maxx -minx + 1, maxy - miny + 1)
+ self.Pos.x, self.Pos.y = minx, miny
+ self.Size = wx.Size(maxx - minx + 1, maxy - miny + 1)
self.BoundingBox = wx.Rect(minbbxx, minbbxy, maxbbxx - minbbxx + 1, maxbbxy - minbbxy + 1)
# Refresh the realpoints that permits to keep the proportionality in wire during resizing