diff -r 97bbbaa54964 -r cc78572dfbbc graphics/SFC_Objects.py --- a/graphics/SFC_Objects.py Tue Feb 26 15:41:18 2008 +0100 +++ b/graphics/SFC_Objects.py Wed Feb 27 11:12:28 2008 +0100 @@ -528,7 +528,7 @@ rect = rect.Union(self.Input.GetConnectedRedrawRect(movex, movey)) if self.Output.IsConnected(): rect = rect.Union(self.Output.GetConnectedRedrawRect(movex, movey)) - if self.Type == "connection" and self.Connection.IsConnected(): + if self.Type == "connection" and self.Condition.IsConnected(): rect = rect.Union(self.Condition.GetConnectedRedrawRect(movex, movey)) return rect @@ -778,7 +778,7 @@ self.RefreshOutputPosition() return movex, 0 else: - return Graphic_Element.ProcessDragging(self, movex, movey, centered, scaling) + return Graphic_Element.ProcessDragging(self, movex, movey, centered, scaling, width_fac = 2, height_fac = 2) # Refresh input element model def RefreshInputModel(self): @@ -816,7 +816,12 @@ dc.SetPen(wx.BLACK_PEN) dc.SetBrush(wx.BLACK_BRUSH) # Draw plain rectangle for representing the transition - dc.DrawRectangle(self.Pos.x, self.Pos.y, self.Size[0] + 1, self.Size[1] + 1) + dc.DrawRectangle(self.Pos.x, + self.Pos.y + (self.Size[1] - SFC_TRANSITION_SIZE[1])/2, + self.Size[0] + 1, + SFC_TRANSITION_SIZE[1] + 1) + vertical_line_x = self.Input.GetPosition()[0] + dc.DrawLine(vertical_line_x, self.Pos.y, vertical_line_x, self.Pos.y + self.Size[1]) # Draw transition condition if self.Type != "connection": text_width, text_height = self.ConditionSize @@ -855,10 +860,7 @@ self.Id = id self.RealConnectors = None number = max(2, number) - if self.Type in [SELECTION_DIVERGENCE, SELECTION_CONVERGENCE]: - self.Size = wx.Size((number - 1) * SFC_DEFAULT_SEQUENCE_INTERVAL, 1) - elif self.Type in [SIMULTANEOUS_DIVERGENCE, SIMULTANEOUS_CONVERGENCE]: - self.Size = wx.Size((number - 1) * SFC_DEFAULT_SEQUENCE_INTERVAL, 3) + self.Size = wx.Size((number - 1) * SFC_DEFAULT_SEQUENCE_INTERVAL, self.GetMinSize()[1]) # Create an input and output connector if self.Type in [SELECTION_DIVERGENCE, SIMULTANEOUS_DIVERGENCE]: self.Inputs = [Connector(self, "", None, wx.Point(self.Size[0] / 2, 0), NORTH, onlyone = True)] @@ -901,7 +903,7 @@ # Forbids to resize the divergence def Resize(self, x, y, width, height): if self.Parent.GetDrawingMode() == FREEDRAWING_MODE: - Graphic_Element.Resize(self, x, y, width, height) + Graphic_Element.Resize(self, x, 0, width, self.GetMinSize()[1]) # Delete this divergence by calling the appropriate method def Delete(self): @@ -1420,7 +1422,7 @@ self.RefreshInputPosition() return movex, 0 else: - return Graphic_Element.ProcessDragging(self, movex, movey, centered, scaling) + return Graphic_Element.ProcessDragging(self, movex, movey, centered, scaling, width_fac = 2) # Refresh input element model def RefreshInputModel(self):