File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -94,16 +94,24 @@ def __init__(
9494 font ,
9595 )
9696
97+ text_empty = False
98+ if not kwargs .get ("text" , "" ):
99+ text_empty = True
100+ kwargs ["text" ] = " "
101+
97102 super ().__init__ (font , ** kwargs )
98103
99- self ._text = "\n " .join (self .lines )
100- self ._text = self ._replace_tabs (self ._text )
101- 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
102110
103111 # call the text updater with all the arguments.
104112 self ._reset_text (
105113 font = font ,
106- text = self ._text ,
114+ text = self ._full_text ,
107115 line_spacing = self ._line_spacing ,
108116 scale = self .scale ,
109117 )
You can’t perform that action at this time.
0 commit comments