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

Avoid popping up dialogs excessively in the Animation editor #84208

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

YuriSizov
Copy link
Contributor

@YuriSizov YuriSizov commented Oct 30, 2023

Quick refactoring to fix #83167. Some other codestyle changes as well, such as initializing primitive types in the header, removing unneeded ClassDB binds, and moving some commands around.

Whether we should at all allow to pop windows which are already visible I don't know. It was also possible in Godot 3. It should not lead to issues anyway, I don't think. I, for one, cannot reproduce the particular issue from the clip in the linked report. But there may be some timing issues, I can imagine.

@YuriSizov YuriSizov added this to the 4.2 milestone Oct 30, 2023
@fire fire requested a review from a team October 30, 2023 21:40
@SaracenOne SaracenOne self-assigned this Oct 31, 2023
Copy link
Member

@SaracenOne SaracenOne left a comment

Choose a reason for hiding this comment

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

Structurally, the code seems sensible, but it seems to have introduced a regression where it crashes if you press one of the arrows to modify the blend times of any of the animations. This seems to be due to the Tree being blocked in tree::_range_click_timeout and functions not properly checking if it's safe to update or not.

@YuriSizov
Copy link
Contributor Author

Oops, silly mistake, checks need to be in both new methods.

Though I have to say, the fact that changing the times goes into the method that could potentially rebuild the tree (or popup the window before) is problematic. Maybe some refactoring is in order.

Copy link
Member

@SaracenOne SaracenOne left a comment

Choose a reason for hiding this comment

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

Okay, LGTM! 👍

@SaracenOne
Copy link
Member

It's not a regression in this PR so I'm okay with approving this, but you're right about the way its structured in regards to it rebuilding the tree through every spinbox update is bad and probably does need refactoring. If for no other reason than the fact that the result of how this is structured means spinboxes don't work how they work in other parts of the app (usually you can click and hold a spinbox and move the mouse up and down to alter them).

@akien-mga akien-mga merged commit 7c2acfd into godotengine:master Oct 31, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov deleted the editor-animation-that-pops branch October 31, 2023 19:31
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.

Dialog content gets resized incorrectly
3 participants