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 some ways to create inconsistent Viewport size states #73188

Merged

Conversation

Sauermann
Copy link
Contributor

In the editor, it was possible to set the size of a SubViewport even in cases where a parent SubViewportContainer had stretch enabled (which automatically adjusts the size).

This PR disables editing a SubViewport.size while the parent disallows it and it makes necessary adjustments during NOTIFICATION_ENTER_TREE.

fix #73160 by disallowing to create the situation where the described problem can happen
continuation of #66906
supersedes #72556

In the editor, it was possible to set the size of a `SubViewport` even
in cases where a parent `SubViewportContainer` had stretch enabled.

This PR disables editing a `SubViewport.size` while the parent disallows
it and it makes necessary adjustments during `NOTIFICATION_ENTER_TREE`.
@Sauermann Sauermann force-pushed the fix-inconsistent-viewport-size branch from 6f08463 to 34a7fc7 Compare February 13, 2023 07:19
@akien-mga akien-mga merged commit 0ef3d1b into godotengine:master Mar 7, 2023
@akien-mga
Copy link
Member

Thanks!

@Sauermann Sauermann deleted the fix-inconsistent-viewport-size branch March 7, 2023 12:30
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.2.

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.

get_global_mouse_position() is shifted in the viewport's transform
4 participants