Fixed two exceptions happening when interacting with viewer(s) in debug mode, when debug data is still not initialized.
--- a/graphics/GraphicCommons.py Thu Sep 16 09:40:36 2021 +0200
+++ b/graphics/GraphicCommons.py Wed Oct 06 10:45:06 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)
--- a/graphics/LD_Objects.py Thu Sep 16 09:40:36 2021 +0200
+++ b/graphics/LD_Objects.py Wed Oct 06 10:45:06 2021 +0200
@@ -405,6 +405,8 @@
if self.Value is None:
self.Value = False
spreading = self.Input.ReceivingCurrent()
+ if spreading == "undefined":
+ spreading = False
if self.Type == CONTACT_NORMAL:
spreading &= self.Value
elif self.Type == CONTACT_REVERSE: