graphics/GraphicCommons.py
changeset 3333 dd49e4055a10
parent 2625 e5ce6c4a8672
child 3344 4a08728a2ea4
equal deleted inserted replaced
3319:e6c758e41f82 3333:dd49e4055a10
  1061             wire.Flush()
  1061             wire.Flush()
  1062         self.Wires = []
  1062         self.Wires = []
  1063 
  1063 
  1064     # Returns the RedrawRect
  1064     # Returns the RedrawRect
  1065     def GetRedrawRect(self, movex=0, movey=0):
  1065     def GetRedrawRect(self, movex=0, movey=0):
       
  1066         if self.ParentBlock == None:
       
  1067             return None
  1066         parent_pos = self.ParentBlock.GetPosition()
  1068         parent_pos = self.ParentBlock.GetPosition()
  1067         x = min(parent_pos[0] + self.Pos.x, parent_pos[0] + self.Pos.x + self.Direction[0] * CONNECTOR_SIZE)
  1069         x = min(parent_pos[0] + self.Pos.x, parent_pos[0] + self.Pos.x + self.Direction[0] * CONNECTOR_SIZE)
  1068         y = min(parent_pos[1] + self.Pos.y, parent_pos[1] + self.Pos.y + self.Direction[1] * CONNECTOR_SIZE)
  1070         y = min(parent_pos[1] + self.Pos.y, parent_pos[1] + self.Pos.y + self.Direction[1] * CONNECTOR_SIZE)
  1069         has_modifier = self.Negated or self.Edge != "none"
  1071         has_modifier = self.Negated or self.Edge != "none"
  1070         if self.Direction[0] == 0:
  1072         if self.Direction[0] == 0: