equal
deleted
inserted
replaced
762 typetext = "/" |
762 typetext = "/" |
763 elif self.Type == COIL_SET: |
763 elif self.Type == COIL_SET: |
764 typetext = "S" |
764 typetext = "S" |
765 elif self.Type == COIL_RESET: |
765 elif self.Type == COIL_RESET: |
766 typetext = "R" |
766 typetext = "R" |
|
767 elif self.Type == COIL_RISING: |
|
768 typetext = "P" |
|
769 elif self.Type == COIL_FALLING: |
|
770 typetext = "N" |
767 if typetext != "": |
771 if typetext != "": |
768 self.TypeSize = self.Parent.GetTextExtent(typetext) |
772 self.TypeSize = self.Parent.GetTextExtent(typetext) |
769 else: |
773 else: |
770 self.TypeSize = 0, 0 |
774 self.TypeSize = 0, 0 |
771 |
775 |
901 typetext = "/" |
905 typetext = "/" |
902 elif self.Type == COIL_SET: |
906 elif self.Type == COIL_SET: |
903 typetext = "S" |
907 typetext = "S" |
904 elif self.Type == COIL_RESET: |
908 elif self.Type == COIL_RESET: |
905 typetext = "R" |
909 typetext = "R" |
|
910 elif self.Type == COIL_RISING: |
|
911 typetext = "P" |
|
912 elif self.Type == COIL_FALLING: |
|
913 typetext = "N" |
906 |
914 |
907 if getattr(dc, "printing", False) and not isinstance(dc, wx.PostScriptDC): |
915 if getattr(dc, "printing", False) and not isinstance(dc, wx.PostScriptDC): |
908 # Draw an clipped ellipse for representing the coil |
916 # Draw an clipped ellipse for representing the coil |
909 clipping_box = dc.GetClippingBox() |
917 clipping_box = dc.GetClippingBox() |
910 dc.SetClippingRegion(self.Pos.x - 1, self.Pos.y, self.Size[0] + 2, self.Size[1] + 1) |
918 dc.SetClippingRegion(self.Pos.x - 1, self.Pos.y, self.Size[0] + 2, self.Size[1] + 1) |