Skip to content

Commit

Permalink
BF: Use same mechanism to enforce str on startText as text
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd authored and Todd committed Mar 17, 2021
1 parent 7415732 commit cc112dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions psychopy/visual/textbox2/textbox2.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,8 @@ def __init__(self, win, text, font,
lineWidth=1, lineColor=None, fillColor=fillColor, opacity=0.1,
autoLog=False)
# then layout the text (setting text triggers _layout())
self.startText = str(text)
self._text = ''
self.text = text if text is not None else ""
self.text = self.startText = text if text is not None else ""

# caret
self._editable = editable
Expand Down

0 comments on commit cc112dd

Please sign in to comment.