graphics/GraphicCommons.py
changeset 1777 c46ec818bdd7
parent 1768 691083b5682a
child 1782 5b6ad7a7fd9d
equal deleted inserted replaced
1776:81aa8aaccdd4 1777:c46ec818bdd7
  1086         rect = wx.Rect(x - abs(movex), y - abs(movey), width + 2 * abs(movex), height + 2 * abs(movey))
  1086         rect = wx.Rect(x - abs(movex), y - abs(movey), width + 2 * abs(movex), height + 2 * abs(movey))
  1087         if self.ValueSize is None and isinstance(self.ComputedValue, (StringType, UnicodeType)):
  1087         if self.ValueSize is None and isinstance(self.ComputedValue, (StringType, UnicodeType)):
  1088             self.ValueSize = self.ParentBlock.Parent.GetMiniTextExtent(self.ComputedValue)
  1088             self.ValueSize = self.ParentBlock.Parent.GetMiniTextExtent(self.ComputedValue)
  1089         if self.ValueSize is not None:
  1089         if self.ValueSize is not None:
  1090             width, height = self.ValueSize
  1090             width, height = self.ValueSize
  1091             rect = rect.Union(wx.Rect(
  1091             rect = rect.Union(
       
  1092                 wx.Rect(
  1092                     parent_pos[0] + self.Pos.x + CONNECTOR_SIZE * self.Direction[0] +
  1093                     parent_pos[0] + self.Pos.x + CONNECTOR_SIZE * self.Direction[0] +
  1093                                     width * (self.Direction[0] - 1) / 2,
  1094                     width * (self.Direction[0] - 1) / 2,
  1094                     parent_pos[1] + self.Pos.y + CONNECTOR_SIZE * self.Direction[1] +
  1095                     parent_pos[1] + self.Pos.y + CONNECTOR_SIZE * self.Direction[1] +
  1095                                     height * (self.Direction[1] - 1),
  1096                     height * (self.Direction[1] - 1),
  1096                     width, height))
  1097                     width, height))
  1097         return rect
  1098         return rect
  1098 
  1099 
  1099     # Change the connector selection
  1100     # Change the connector selection
  1100     def SetSelected(self, selected):
  1101     def SetSelected(self, selected):