Open ParanoidHawk opened 1 year ago
Found that this bug occurs because the scroll_offset_changed signal is emitted in _update_scroll_offset, which is called every time the graph is redrawn for any reason whatsoever.
This seems to be an issue introduced by the fix for #72479.
Made a PR at #76322, need some guidance on whether how I've implemented the fix is within the project's guidelines, and whether what I've deleted has effects on other types of graphs in the editor I'm not aware of that people more familiar will be able to point out.
Godot version
4.0.2.stable
System information
Windows 10
Issue description
When using GraphEdit, the scroll_offset_changed signal will emit under circumstances where you wouldn't expect/it shouldn't be emitting, where the scroll_offset has not actually changed.
Noticeably this happens when adding a new GraphNode child, as well as if you just click on the graph without moving it at all.
Steps to reproduce
Using the reproduction project attached, go into the Offset Demo plugin screen at the top next to AssetLib. Open the output window to see messages for when the scroll_offset is changed.
Add a node to the graph using the 'Add node' button and see the scroll offset signal occurring, without the offset ever changing. Clicking on the graph will also cause the behaviour.
(The repro project was edited in the 4.1 development branch to check it still existed but this behaviour was first observed on 4.0.2.stable.)
Minimal reproduction project
scroll offset minrepro.zip