204 self.Action = None |
204 self.Action = None |
205 self.RefreshBoundingBox() |
205 self.RefreshBoundingBox() |
206 |
206 |
207 # Refresh the step bounding box |
207 # Refresh the step bounding box |
208 def RefreshBoundingBox(self): |
208 def RefreshBoundingBox(self): |
|
209 # TODO: check and remove dead coded |
|
210 # |
209 # Calculate the bounding box size |
211 # Calculate the bounding box size |
210 if self.Action: |
212 # if self.Action: |
211 bbx_width = self.Size[0] + CONNECTOR_SIZE |
213 # bbx_width = self.Size[0] + CONNECTOR_SIZE |
212 else: |
214 # else: |
213 bbx_width = self.Size[0] |
215 # bbx_width = self.Size[0] |
214 if self.Initial: |
216 # if self.Initial: |
215 bbx_y = self.Pos.y |
217 # bbx_y = self.Pos.y |
216 bbx_height = self.Size[1] |
218 # bbx_height = self.Size[1] |
217 if self.Output: |
219 # if self.Output: |
218 bbx_height += CONNECTOR_SIZE |
220 # bbx_height += CONNECTOR_SIZE |
219 else: |
221 # else: |
220 bbx_y = self.Pos.y - CONNECTOR_SIZE |
222 # bbx_y = self.Pos.y - CONNECTOR_SIZE |
221 bbx_height = self.Size[1] + CONNECTOR_SIZE |
223 # bbx_height = self.Size[1] + CONNECTOR_SIZE |
222 if self.Output: |
224 # if self.Output: |
223 bbx_height += CONNECTOR_SIZE |
225 # bbx_height += CONNECTOR_SIZE |
224 # self.BoundingBox = wx.Rect(self.Pos.x, bbx_y, bbx_width + 1, bbx_height + 1) |
226 # self.BoundingBox = wx.Rect(self.Pos.x, bbx_y, bbx_width + 1, bbx_height + 1) |
225 self.BoundingBox = wx.Rect(self.Pos.x, self.Pos.y, self.Size[0] + 1, self.Size[1] + 1) |
227 self.BoundingBox = wx.Rect(self.Pos.x, self.Pos.y, self.Size[0] + 1, self.Size[1] + 1) |
226 |
228 |
227 # Refresh the positions of the step connectors |
229 # Refresh the positions of the step connectors |
228 def RefreshConnectors(self): |
230 def RefreshConnectors(self): |