You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CurveEditor constructor is called every time you do any operation. This is for example why handles get deselected after you drag them.
Upon investigation, it appears that this is because Curve's methods add_point() and remove_point() call notify_property_list_changed(). This was added as a fix in #61628, which fixed a regression most likely from #58023.
This bug isn't a big deal at the moment, but I'm currently making a PR to rework the curve editor and this bug is blocking it completely.
Steps to reproduce
Create a Curve.
Add a point.
Move the point.
Watch it get deselected.
Minimal reproduction project
N/A takes 10sec to set up, moreover the best way to see this is by playing with the source code.
The text was updated successfully, but these errors were encountered:
I am not really sure why we're doing those notify_property_list_changed() calls in Curve. Other similar resources like Gradient don't seem to have them.
Edit: Maybe because the points are dumped in an array as a raw data, while gradient points have separate sections for offsets and colors?
Because the structure of the property tree (see Curve2D::_get_property_list()) has changed, it needs to use notify_property_list_changed() to finally call EditorInspector::update_tree(). This is true for all arrays added using the ADD_ARRAY* macros.
But for the case where the size of the array has not changed, there is no need to call notify_property_list_changed(). The size of the array can be checked to avoid calling notify_property_list_changed().
Here it is caused by an unnecessary notify_property_list_changed() call in Curve::set_data() when just changing the element value.
Godot version
4.0
System information
Ubuntu 22.04.1 LTS
Issue description
The CurveEditor constructor is called every time you do any operation. This is for example why handles get deselected after you drag them.
Upon investigation, it appears that this is because Curve's methods
add_point()
andremove_point()
callnotify_property_list_changed()
. This was added as a fix in #61628, which fixed a regression most likely from #58023.This bug isn't a big deal at the moment, but I'm currently making a PR to rework the curve editor and this bug is blocking it completely.
Steps to reproduce
Create a Curve.
Add a point.
Move the point.
Watch it get deselected.
Minimal reproduction project
N/A takes 10sec to set up, moreover the best way to see this is by playing with the source code.
The text was updated successfully, but these errors were encountered: