Skip to content

skip updating text if it's the same in bitmap_label#238

Merged
tannewt merged 1 commit into
adafruit:mainfrom
FoamyGuy:fix_same_text_regression
May 6, 2026
Merged

skip updating text if it's the same in bitmap_label#238
tannewt merged 1 commit into
adafruit:mainfrom
FoamyGuy:fix_same_text_regression

Conversation

@FoamyGuy
Copy link
Copy Markdown
Contributor

@FoamyGuy FoamyGuy commented May 5, 2026

This fixes a regression that I think was introduced during the 4.0 refactor that combined outline, scrolling, and accent into bitmap_label.

bitmap_label used to defer to LabelBase.text setter property which has a check to ignore values that are the same as the current text here:

if new_text == self._text:
return

The refactored version lacked that same check, I noticed it while working on my current project. When the text gets updated over and over in a tight loop it causes it to flicker on the display.

Resolves it by using the same logic inside bitmap label text property setter.

@FoamyGuy FoamyGuy requested a review from a team May 5, 2026 21:04
Copy link
Copy Markdown
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit eae352b into adafruit:main May 6, 2026
1 check passed
adafruit-adabot pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants