graphics/SFC_Objects.py
changeset 1652 be605b2e6e3a
parent 1571 486f94a8032c
child 1653 d98cc9d19a5c
equal deleted inserted replaced
1647:13d15a1ae899 1652:be605b2e6e3a
   651         return connectors
   651         return connectors
   652     
   652     
   653     # Returns the RedrawRect
   653     # Returns the RedrawRect
   654     def GetRedrawRect(self, movex = 0, movey = 0):
   654     def GetRedrawRect(self, movex = 0, movey = 0):
   655         rect = Graphic_Element.GetRedrawRect(self, movex, movey)
   655         rect = Graphic_Element.GetRedrawRect(self, movex, movey)
   656         rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
   656         if self.Input:
   657         rect = rect.Union(self.Output.GetRedrawRect(movex, movey))
   657             rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
       
   658         if self.Output:
       
   659             rect = rect.Union(self.Output.GetRedrawRect(movex, movey))
   658         if movex != 0 or movey != 0:
   660         if movex != 0 or movey != 0:
   659             if self.Input.IsConnected():
   661             if self.Input.IsConnected():
   660                 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
   662                 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
   661             if self.Output.IsConnected():
   663             if self.Output.IsConnected():
   662                 rect = rect.Union(self.Output.GetConnectedRedrawRect(movex, movey))
   664                 rect = rect.Union(self.Output.GetConnectedRedrawRect(movex, movey))
  1545         return {self.Input : element.Input}
  1547         return {self.Input : element.Input}
  1546     
  1548     
  1547     # Returns the RedrawRect
  1549     # Returns the RedrawRect
  1548     def GetRedrawRect(self, movex = 0, movey = 0):
  1550     def GetRedrawRect(self, movex = 0, movey = 0):
  1549         rect = Graphic_Element.GetRedrawRect(self, movex, movey)
  1551         rect = Graphic_Element.GetRedrawRect(self, movex, movey)
  1550         rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
  1552         if self.Input:
       
  1553             rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
  1551         if movex != 0 or movey != 0:
  1554         if movex != 0 or movey != 0:
  1552             if self.Input.IsConnected():
  1555             if self.Input.IsConnected():
  1553                 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
  1556                 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
  1554         return rect
  1557         return rect
  1555     
  1558     
  1822         return {self.Input : element.Input}
  1825         return {self.Input : element.Input}
  1823     
  1826     
  1824     # Returns the RedrawRect
  1827     # Returns the RedrawRect
  1825     def GetRedrawRect(self, movex = 0, movey = 0):
  1828     def GetRedrawRect(self, movex = 0, movey = 0):
  1826         rect = Graphic_Element.GetRedrawRect(self, movex, movey)
  1829         rect = Graphic_Element.GetRedrawRect(self, movex, movey)
  1827         rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
  1830         if self.Input:
       
  1831             rect = rect.Union(self.Input.GetRedrawRect(movex, movey))
  1828         if movex != 0 or movey != 0:
  1832         if movex != 0 or movey != 0:
  1829             if self.Input.IsConnected():
  1833             if self.Input.IsConnected():
  1830                 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
  1834                 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey))
  1831         return rect
  1835         return rect
  1832     
  1836