# HG changeset patch # User laurent # Date 1303225743 -7200 # Node ID 63e141705d19aaf0a4cd9fb5a34e9fd849d93461 # Parent 193505b8ddcf009ac36b1c8bcb45ff253f9bf9de Fix bug with Function Blocks input and output position on Windows diff -r 193505b8ddcf -r 63e141705d19 graphics/GraphicCommons.py --- a/graphics/GraphicCommons.py Tue Apr 19 15:07:57 2011 +0200 +++ b/graphics/GraphicCommons.py Tue Apr 19 17:09:03 2011 +0200 @@ -1363,8 +1363,7 @@ # Changes the connector name size def RefreshNameSize(self): if self.Name != "": - dc = wx.ClientDC(self.ParentBlock.Parent) - self.NameSize = dc.GetTextExtent(self.Name) + self.NameSize = self.ParentBlock.Parent.GetTextExtent(self.Name) else: self.NameSize = 0, 0 @@ -1703,10 +1702,10 @@ width, height = self.ValueSize if self.BoundingBox[2] > width * 4 or self.BoundingBox[3] > height * 4: x = self.Points[0].x + width * self.StartPoint[1][0] / 2 - y = self.Points[0].y + (height * self.StartPoint[1][1] - 1) + y = self.Points[0].y + height * (self.StartPoint[1][1] - 1) rect = rect.Union(wx.Rect(x, y, width, height)) x = self.Points[-1].x + width * self.EndPoint[1][0] / 2 - y = self.Points[-1].y + (height * self.EndPoint[1][1] - 1) + y = self.Points[-1].y + height * (self.EndPoint[1][1] - 1) rect = rect.Union(wx.Rect(x, y, width, height)) else: middle = len(self.Segments) / 2 + len(self.Segments) % 2 - 1