change in the setText method of TextItem

This commit is contained in:
lesauxvi 2016-03-18 13:48:50 +01:00
parent fe115a9667
commit e1c652662d

View File

@ -58,14 +58,14 @@ class TextItem(GraphicsObject):
self.border = fn.mkPen(border) self.border = fn.mkPen(border)
self.setAngle(angle) self.setAngle(angle)
def setText(self, text, color=(200,200,200)): def setText(self, text, color=None):
""" """
Set the text of this item. Set the text of this item.
The color entry is deprecated and kept to avoid an API change.
This method sets the plain text of the item; see also setHtml(). This method sets the plain text of the item; see also setHtml().
""" """
if color is not None:
self.setColor(color)
self.textItem.setPlainText(text) self.textItem.setPlainText(text)
self.updateTextPos() self.updateTextPos()