fix redraw debug instance tab after transferring new build to PLC. closes #15
--- a/graphics/SFC_Objects.py Fri Jan 27 16:53:04 2017 +0300
+++ b/graphics/SFC_Objects.py Mon Feb 06 20:23:45 2017 +0300
@@ -653,8 +653,10 @@
# Returns the RedrawRect
def GetRedrawRect(self, movex = 0, movey = 0):
rect = Graphic_Element.GetRedrawRect(self, movex, movey)
- rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
- rect = rect.Union(self.Output.GetRedrawRect(movex, movey))
+ if self.Input:
+ rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
+ if self.Output:
+ rect = rect.Union(self.Output.GetRedrawRect(movex, movey))
if movex != 0 or movey != 0:
if self.Input.IsConnected():
rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
@@ -1547,7 +1549,8 @@
# Returns the RedrawRect
def GetRedrawRect(self, movex = 0, movey = 0):
rect = Graphic_Element.GetRedrawRect(self, movex, movey)
- rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
+ if self.Input:
+ rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
if movex != 0 or movey != 0:
if self.Input.IsConnected():
rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
@@ -1824,7 +1827,8 @@
# Returns the RedrawRect
def GetRedrawRect(self, movex = 0, movey = 0):
rect = Graphic_Element.GetRedrawRect(self, movex, movey)
- rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
+ if self.Input:
+ rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
if movex != 0 or movey != 0:
if self.Input.IsConnected():
rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))