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

GraphNode raises excessive resized events #93832

Closed
Naros opened this issue Jul 1, 2024 · 4 comments · Fixed by #93908
Closed

GraphNode raises excessive resized events #93832

Naros opened this issue Jul 1, 2024 · 4 comments · Fixed by #93908
Assignees
Milestone

Comments

@Naros
Copy link
Contributor

Naros commented Jul 1, 2024

Tested versions

4.3.beta2

System information

Windows 11

Issue description

When using the GraphEdit scroll bars to change the scroll position within the graph canvas, all GraphNode instances on the canvas emit a resized event. As the GraphNode is not being resized and only the scroll offset is being adjusted, it makes no sense why a GraphNode raises a resized event.

This only seems to apply to GraphNode instances within the viewport of the GraphEdit canvas. Once the node has left the view of the canvas, it stops emitting the signal.

In Godot 4.3, there is the new resized_end event; however, for code that needs to be compatible with Godot 4.2, this signal isn't possible for Godot 4.2 and the only viable option is resized.

Steps to reproduce

  1. Create a GraphEdit
  2. Add a GraphNode to the canvas
  3. Connect a signal callback to the resized signal of the GraphNode
  4. Move the scroll bars in the GraphEdit, the resized events are fired for the node instances.

Minimal reproduction project (MRP)

N/A

@Geometror
Copy link
Member

Geometror commented Jul 2, 2024

I will investigate this, but depending on your usecase you can look into the resize_request signal.

Edit: Does this also happen when panning via the middle mouse button?

@Naros
Copy link
Contributor Author

Naros commented Jul 2, 2024

I will investigate this, but depending on your usecase you can look into the resize_request signal.

I would except for the signal emits incorrect values as I raised a separate issue on that, see #93834.

Edit: Does this also happen when panning via the middle mouse button?

Yes it does @Geometror.

@Geometror
Copy link
Member

Could you confirm that #93908 fixes this issue?

@Naros
Copy link
Contributor Author

Naros commented Jul 3, 2024

Hi Geometror, I'll continue the conversation on the PR, but there seems to be a new problem introduced w/the change.

@AThousandShips AThousandShips added this to the 4.3 milestone Jul 4, 2024
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.

4 participants