graphics/SFC_Objects.py
changeset 154 203c4acdaf27
parent 146 cc70dd430601
child 162 e746ff4aa8be
equal deleted inserted replaced
153:f0e8e7f58a5a 154:203c4acdaf27
   116             self.RefreshBoundingBox()
   116             self.RefreshBoundingBox()
   117     
   117     
   118     # Remove output connector from step
   118     # Remove output connector from step
   119     def RemoveInput(self):
   119     def RemoveInput(self):
   120         if self.Input:
   120         if self.Input:
   121             self.Input.UnConnect()
   121             self.Input.UnConnect(delete = self.Parent.GetDrawingMode() == FREEDRAWING_MODE)
   122             self.Input = None
   122             self.Input = None
   123             self.RefreshBoundingBox()
   123             self.RefreshBoundingBox()
   124     
   124     
   125     # Add output connector to step
   125     # Add output connector to step
   126     def AddOutput(self):
   126     def AddOutput(self):
   129             self.RefreshBoundingBox()
   129             self.RefreshBoundingBox()
   130     
   130     
   131     # Remove output connector from step
   131     # Remove output connector from step
   132     def RemoveOutput(self):
   132     def RemoveOutput(self):
   133         if self.Output:
   133         if self.Output:
   134             self.Output.UnConnect()
   134             self.Output.UnConnect(delete = self.Parent.GetDrawingMode() == FREEDRAWING_MODE)
   135             self.Output = None
   135             self.Output = None
   136             self.RefreshBoundingBox()
   136             self.RefreshBoundingBox()
   137     
   137     
   138     # Add action connector to step
   138     # Add action connector to step
   139     def AddAction(self):
   139     def AddAction(self):
   142             self.RefreshBoundingBox()
   142             self.RefreshBoundingBox()
   143     
   143     
   144     # Remove action connector from step
   144     # Remove action connector from step
   145     def RemoveAction(self):
   145     def RemoveAction(self):
   146         if self.Action:
   146         if self.Action:
   147             self.Action.UnConnect()
   147             self.Action.UnConnect(delete = self.Parent.GetDrawingMode() == FREEDRAWING_MODE)
   148             self.Action = None
   148             self.Action = None
   149             self.RefreshBoundingBox()
   149             self.RefreshBoundingBox()
   150     
   150     
   151     # Refresh the step bounding box
   151     # Refresh the step bounding box
   152     def RefreshBoundingBox(self):
   152     def RefreshBoundingBox(self):
   672 
   672 
   673     # Changes the transition type
   673     # Changes the transition type
   674     def SetType(self, type, condition = None):
   674     def SetType(self, type, condition = None):
   675         if self.Type != type:
   675         if self.Type != type:
   676             if self.Type == "connection":
   676             if self.Type == "connection":
   677                self.Condition.UnConnect() 
   677                self.Condition.UnConnect(delete = self.Parent.GetDrawingMode() == FREEDRAWING_MODE) 
   678             self.Type = type
   678             self.Type = type
   679             if type == "connection":
   679             if type == "connection":
   680                 self.Condition = Connector(self, "", "BOOL", wx.Point(0, self.Size[1] / 2), WEST)
   680                 self.Condition = Connector(self, "", "BOOL", wx.Point(0, self.Size[1] / 2), WEST)
   681             else:
   681             else:
   682                 if condition == None:
   682                 if condition == None: