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

GraphEdit's connection layer is not added as internal child #85005

Closed
Yagich opened this issue Nov 17, 2023 · 4 comments · Fixed by #85009
Closed

GraphEdit's connection layer is not added as internal child #85005

Yagich opened this issue Nov 17, 2023 · 4 comments · Fixed by #85009

Comments

@Yagich
Copy link
Contributor

Yagich commented Nov 17, 2023

Godot version

4.2b6

System information

Linux/Manjaro

Issue description

In my application, I add GraphNodes of a specific type. When getting all children with include_internal set to false, the _connection_layer is returned as the first child, which I don't think is intended; I expect the first non-internal child to be a user-added node.

add_child(connections_layer, false);

Steps to reproduce

  1. Add a GraphEdit
  2. Add a GraphNode child to it at runtime
  3. Try to access the node with get_child(0)

Minimal reproduction project

graphedit-non-internal-child.zip

@YuriSizov
Copy link
Contributor

4.0b6

You probably mean 4.2?

@AThousandShips
Copy link
Member

It was internal but seems to have been overlooked in #79308

CC @Geometror was this by design?

@Yagich
Copy link
Contributor Author

Yagich commented Nov 17, 2023

4.0b6

You probably mean 4.2?

Yes, changed to 4.2b6, thanks!

@Geometror
Copy link
Member

I think I had to set it as a non-internal node when implementing GraphFrame (which was then postponed and removed from the refactoring PR) as frames need to be drawn below the connection layer (and we don't support internal nodes at arbitrary positions). Maybe this could be implemented utilizing the z index or another solution. Either way I agree the connection layer should be an internal node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants