def AddBranch(self):
if self.Type in [SELECTION_DIVERGENCE, SIMULTANEOUS_DIVERGENCE]:
maxx = 0
for output in self.Outputs:
pos = output.GetRelPosition()
maxx = max(maxx, pos.x)
connector = Connector(self, "", None, wx.Point(maxx + SFC_DEFAULT_SEQUENCE_INTERVAL, self.Size[1]), SOUTH, onlyone=True)
self.Outputs.append(connector)
self.MoveConnector(connector, 0)
elif self.Type in [SELECTION_CONVERGENCE, SIMULTANEOUS_CONVERGENCE]:
maxx = 0
for input in self.Inputs:
pos = input.GetRelPosition()
maxx = max(maxx, pos.x)
connector = Connector(self, "", None, wx.Point(maxx + SFC_DEFAULT_SEQUENCE_INTERVAL, 0), NORTH, onlyone=True)
self.Inputs.append(connector)
self.MoveConnector(connector, SFC_DEFAULT_SEQUENCE_INTERVAL)
# Remove a branch from the divergence
评论列表
文章目录