graphics/GraphicCommons.py
branchwxPython4
changeset 3344 4a08728a2ea4
parent 3303 0ffb41625592
parent 3333 dd49e4055a10
--- a/graphics/GraphicCommons.py	Tue Oct 19 13:09:45 2021 +0200
+++ b/graphics/GraphicCommons.py	Wed Oct 20 08:57:07 2021 +0200
@@ -1063,6 +1063,8 @@
 
     # Returns the RedrawRect
     def GetRedrawRect(self, movex=0, movey=0):
+        if self.ParentBlock == None:
+            return None
         parent_pos = self.ParentBlock.GetPosition()
         x = min(parent_pos[0] + self.Pos.x, parent_pos[0] + self.Pos.x + self.Direction[0] * CONNECTOR_SIZE)
         y = min(parent_pos[1] + self.Pos.y, parent_pos[1] + self.Pos.y + self.Direction[1] * CONNECTOR_SIZE)