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 port cache calculation in GraphNode #91083

Merged
merged 1 commit into from
Apr 25, 2024
Merged

Conversation

nagidev
Copy link
Contributor

@nagidev nagidev commented Apr 23, 2024

Fixes #91082 by updating the left_port_cache & right_port_cache calculation in GraphNode::_port_pos_update.

@nagidev nagidev requested a review from a team as a code owner April 23, 2024 22:10
scene/gui/graph_node.cpp Outdated Show resolved Hide resolved
scene/gui/graph_node.cpp Outdated Show resolved Hide resolved
scene/gui/graph_node.cpp Outdated Show resolved Hide resolved
@akien-mga
Copy link
Member

@Geometror See also #90229 and #90787. Seems like it's easy to make mistakes in this code with different indices.

Copy link
Member

@Geometror Geometror left a comment

Choose a reason for hiding this comment

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

Looks good!

@Geometror
Copy link
Member

@akien-mga Yes indeed (child index, slot index and port index), but unfortunately that's just how the current system works. Changing this would basically require a complete rework of GraphNode/GraphEdit (much more sophisticated than the refactoring I've done). Maybe for 5.0 :)

@akien-mga akien-mga merged commit 81aa139 into godotengine:master Apr 25, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

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.

GraphNode slots don't work if a non-Control node is added anywhere above the last child
6 participants