fix for TextBox when initialized with an empty text#235
fix for TextBox when initialized with an empty text#235FoamyGuy merged 3 commits intoadafruit:mainfrom
Conversation
|
The latest commits avoid the Also used |
dhalbert
left a comment
There was a problem hiding this comment.
This seems ok, but could self._bitmap always be created even if the text is empty? Then there is no hack needed.
|
I will merge this for now to resolve the exception. I can also look into always creating the bitmap without resorting to spoofing the text value. I think I tried that way first and it caused some of the bounding box calculations from where the bitmap is created to turn out differently and made the box shift upwards some. |
Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 4.0.1 from 4.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#235 from FoamyGuy/fix_empty_textbox_init
Another fix for TextBox
This fixes an issue when TextBox is initialized with empty Text the
self._bitmapcan be None when it tries to fill it with background color. By ensuring thatkwargs["text"]is set to a space instead of empty string before the call to super init it ensures that the Bitmap will always get created.