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 issue where set_global_position(global_position) in Control resulted in a different result than global_position #87432

Merged

Conversation

Rindbee
Copy link
Contributor

@Rindbee Rindbee commented Jan 21, 2024

Previously, the case where the pivot point was not at the origin was ignored.

Fix #87354.

@Rindbee Rindbee requested a review from a team as a code owner January 21, 2024 05:56
@AThousandShips AThousandShips added this to the 4.3 milestone Jan 21, 2024
@tokengamedev
Copy link

Can we please port to 4.2 branch also.

scene/gui/control.cpp Outdated Show resolved Hide resolved
scene/gui/control.cpp Outdated Show resolved Hide resolved
@Rindbee Rindbee force-pushed the fix-set_global_position-in-control branch 2 times, most recently from 64cd788 to a2221b9 Compare January 22, 2024 13:04
scene/gui/control.cpp Outdated Show resolved Hide resolved
scene/gui/control.cpp Outdated Show resolved Hide resolved
@Rindbee Rindbee force-pushed the fix-set_global_position-in-control branch 2 times, most recently from ec8220c to d327b5f Compare January 22, 2024 15:59
@YuriSizov YuriSizov added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jan 22, 2024
scene/gui/control.cpp Outdated Show resolved Hide resolved
…esulted in a different result than `global_position`

Previously, the case where the pivot point was not at the origin was ignored.
@Rindbee Rindbee force-pushed the fix-set_global_position-in-control branch from d327b5f to 0c6b6fe Compare January 22, 2024 16:05
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

AFAICT it works fine now (I've done some testing).

@YuriSizov YuriSizov merged commit 9c9a00f into godotengine:master Jan 24, 2024
16 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@Rindbee Rindbee deleted the fix-set_global_position-in-control branch January 24, 2024 23:45
@kleonc kleonc removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Mar 15, 2024
@kleonc
Copy link
Member

kleonc commented Mar 15, 2024

Shouldn't be cherry-picked, it introduced a regression: #89497.

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.

Control.set_global_position(global_position) doesn't work after rotated around custom pivot
5 participants