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

Allow overriding SpinBox value on focus_exited #100860

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

larspet
Copy link
Contributor

@larspet larspet commented Dec 27, 2024

Fixes #100836

When setting SpinBox's value the text is only updated on NOTIFICATION_DRAW. If the value is changed on the same frame as the focus is lost, this means the old text will be submitted instead. This PR thus checks if the value has changed before submitting the text.

With this PR the MRP will:

  • Correctly override the value on focus_exited.
  • Not call _val_changed() when using set_value_no_signal().
  • Only call _val_changed() once when directly setting value.

@larspet larspet requested a review from a team as a code owner December 27, 2024 21:19
@Chaosus Chaosus added this to the 4.4 milestone Dec 29, 2024
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

I gave it some testing and didn't spot any problems.

@akien-mga akien-mga merged commit 2850b71 into godotengine:master Jan 13, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants