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 incorrect computing anchor of Control node when reset on save with saving flag #91495

Merged
merged 1 commit into from
May 6, 2024

Conversation

TokageItLab
Copy link
Member

@TokageItLab TokageItLab commented May 3, 2024

Fixes #90079. Alternative of #91493.

#91493 seems to have some effect on the scene and cannot pass the editor test. Possibly the test is not correct (like process timing problem?) but I don't know the details...

It seems a bit of a stopgap, but this PR adds the saving flag and provides a narrower fix focused only on save time.

@TokageItLab TokageItLab added bug topic:editor topic:gui topic:animation cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels May 3, 2024
@TokageItLab TokageItLab added this to the 4.3 milestone May 3, 2024
@TokageItLab TokageItLab requested review from a team May 3, 2024 03:08
@TokageItLab TokageItLab requested a review from a team as a code owner May 3, 2024 03:08
@TokageItLab TokageItLab changed the title Avoid incorrect computing anchor of Control node when reset on save Avoid incorrect computing anchor of Control node when reset on save with saving flag May 3, 2024
@lyuma lyuma requested a review from KoBeWi May 3, 2024 16:40
@KoBeWi
Copy link
Member

KoBeWi commented May 4, 2024

This makes RESET animation have no effects on Control nodes. You could at least add is_inside_tree() check (in addition to saving), to make the position reset when saving the current scene. RESET would still have no effect when saving inactive scene, but at least it wouldn't break layouts.

@TokageItLab TokageItLab force-pushed the fix-control-saving branch from 8e178a8 to 57cd00a Compare May 4, 2024 23:33
@TokageItLab
Copy link
Member Author

@KoBeWi Thanks and indeed. I added !is_inside_tree() check. I assume this workaround will now only work if the scene is saved in a background tab.

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.

It's a hack, but at least it fixes the issue.

@akien-mga akien-mga merged commit 94b8a1d into godotengine:master May 6, 2024
16 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
Labels
bug cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release topic:animation topic:editor topic:gui
Projects
None yet
3 participants