Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] MultiRect - Fix flushing in TextEdit #79498

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

lawnjelly
Copy link
Member

The FontDrawer used in TextEdit was previously not being flushed before drawing auto-completion boxes. This was causing rendering artifacts. This PR also increases the backward compatibility of the MultiRect OFF mode, by forcing a flush after each character.

Fixes #77582

Notes

  • Fixes the issue by flushing before the "drawer" object scope is destroyed, which writes the text before the completion box is drawn.
  • Simplifies the MultiRect API a little to use flush() instead of begin() / end().
  • Thanks to the flush per character, the legacy mode is now truer to previous behaviour.

The FontDrawer used in TextEdit was previously not being flushed before drawing auto-completion boxes. This was causing rendering artifacts.
This PR also increases the backward compatibility of the MultiRect OFF mode, by forcing a flush after each character.
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Seems fine to me!

@akien-mga akien-mga changed the title MultiRect - Fix flushing in TextEdit [3.x] MultiRect - Fix flushing in TextEdit Aug 1, 2023
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@akien-mga akien-mga merged commit 078e1b9 into godotengine:3.x Aug 2, 2023
13 checks passed
@akien-mga
Copy link
Member

Thanks!

@lawnjelly lawnjelly deleted the multirect_fix_flushing branch August 2, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants