File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -94,19 +94,24 @@ def __init__(
9494 font ,
9595 )
9696
97- if not kwargs .get ("text" , "" ):
97+ text_empty = False
98+ if kwargs .get ("text" , "" ) == "" :
99+ text_empty = True
98100 kwargs ["text" ] = " "
99101
100102 super ().__init__ (font , ** kwargs )
101103
102- self ._text = "\n " .join (self .lines )
103- self ._text = self ._replace_tabs (self ._text )
104- self ._original_text = self ._text
104+ if text_empty :
105+ self ._full_text = ""
106+
107+ self ._full_text = "\n " .join (self .lines )
108+ self ._full_text = self ._replace_tabs (self ._full_text )
109+ self ._original_text = self ._full_text
105110
106111 # call the text updater with all the arguments.
107112 self ._reset_text (
108113 font = font ,
109- text = self ._text ,
114+ text = self ._full_text ,
110115 line_spacing = self ._line_spacing ,
111116 scale = self .scale ,
112117 )
You can’t perform that action at this time.
0 commit comments