equal
deleted
inserted
replaced
512 transition.SetSize(self.Size[0], self.Size[1]) |
512 transition.SetSize(self.Size[0], self.Size[1]) |
513 if pos is not None: |
513 if pos is not None: |
514 transition.SetPosition(pos.x, pos.y) |
514 transition.SetPosition(pos.x, pos.y) |
515 transition.Input = self.Input.Clone(transition) |
515 transition.Input = self.Input.Clone(transition) |
516 transition.Output = self.Output.Clone(transition) |
516 transition.Output = self.Output.Clone(transition) |
|
517 if self.Type == "connection": |
|
518 transition.Condition = self.Condition.Clone(transition) |
517 return transition |
519 return transition |
518 |
520 |
519 # Returns the RedrawRect |
521 # Returns the RedrawRect |
520 def GetRedrawRect(self, movex = 0, movey = 0): |
522 def GetRedrawRect(self, movex = 0, movey = 0): |
521 rect = Graphic_Element.GetRedrawRect(self, movex, movey) |
523 rect = Graphic_Element.GetRedrawRect(self, movex, movey) |
524 if movex != 0 or movey != 0: |
526 if movex != 0 or movey != 0: |
525 if self.Input.IsConnected(): |
527 if self.Input.IsConnected(): |
526 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey)) |
528 rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey)) |
527 if self.Output.IsConnected(): |
529 if self.Output.IsConnected(): |
528 rect = rect.Union(self.Output.GetConnectedRedrawRect(movex, movey)) |
530 rect = rect.Union(self.Output.GetConnectedRedrawRect(movex, movey)) |
|
531 if self.Type == "connection" and self.Connection.IsConnected(): |
|
532 rect = rect.Union(self.Condition.GetConnectedRedrawRect(movex, movey)) |
529 return rect |
533 return rect |
530 |
534 |
531 # Forbids to change the transition size |
535 # Forbids to change the transition size |
532 def SetSize(self, width, height): |
536 def SetSize(self, width, height): |
533 if self.Parent.GetDrawingMode() == FREEDRAWING_MODE: |
537 if self.Parent.GetDrawingMode() == FREEDRAWING_MODE: |