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

Fix editor spin slider remaining editable if set read_only during and edit and fix related animation player crash #76122

Merged

Conversation

spanzeri
Copy link
Contributor

This fixes a crash in the animation player.
The easiest way to reproduce it is to open 2 scenes, one with an animation player and any other one.
First select and focus the line edit for the snap step, then switch to another scene.
Two issues are noticeable:

  • The editor spin slider remains editable, even though the animation is no longer selected and the spin slider has been set read only;
  • The animation editor crashes trying to update the value of the snap on an animation that is no longer valid;

The changes on editor_spin_slider makes it so the line edit is correctly unfocused and un-selected if it becomes read only mid-edit.
The animation_track_editor check is just a sanity check and is not strictly necessary with the editor spin slider changes

@spanzeri spanzeri force-pushed the fix_animation_snap_slider_crash branch from 6015fd3 to 6f6832f Compare April 22, 2023 16:33
@spanzeri
Copy link
Contributor Author

Thank you for the suggestions!

@spanzeri spanzeri force-pushed the fix_animation_snap_slider_crash branch from 6f6832f to b6abb34 Compare April 22, 2023 16:34
@akien-mga akien-mga merged commit 91bcfa8 into godotengine:master Apr 24, 2023
@akien-mga
Copy link
Member

Thanks!

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.3.

@spanzeri spanzeri deleted the fix_animation_snap_slider_crash branch April 27, 2023 20:45
@akien-mga akien-mga changed the title Fix editor spin slider remaining editable if set read_only during and edit and fix related animation player crash Fix editor spin slider remaining editable if set read_only during and edit and fix related animation player crash May 12, 2023
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.

5 participants