Repository navigation
fix: modifying waypoints for a group layer no longer modifies sibling layers - #3312
Conversation
|
Nice bug catch!
Group, Switch group and Filter group are all layers that show an encapsulated canvas (that has one or more stacked layers). Code-wise they are all derived from About your code, I don't if it's preferred to inspect the canvas node ( |
|
That makes sense. I'll try it with your suggestion, definitely seems like the logic is clearer if the canvas parameter is inspected instead of the layer itself. |
9d5d718 to
167d7ce
Compare
Both versions seemed to work for me at first so I did some more digging, and found something interesting - my first version with I updated it to use the canvas node and did some testing with Time Offsets to make sure that was all still working. |
|
Hi, @mosasauridae . Why did you close this PR? |
|
I was cleaning out some old branches in my repo and deleted the branch associated with this PR. I figured it'd been pocket-vetoed after over a year with no activity, and wasn't needed. I can restore the branch if there's still interest in this change. And if there's anything else that would need to go with this (ie creating an issue for it) I can do that as well. |
|
It wasn't vetoed :) I just asked you a small change before we merge it ;) else if (value_desc.parent_is_layer()) {
const auto value = value_desc.get_layer()->get_param(value_desc.get_param_name());
if (value.get_type() == synfig::type_canvas)
node = value.get(synfig::Canvas::Handle());
} |
|
Ohh I'm sorry I didn't realize I had more changes, I thought it was good to go after the first update. I'll restore the branch. |
1d5883f to
02b1c80
Compare
|
Sorry, @mosasauridae , but I have one more request XD We're trying to keep a consistent code style for a while now, but we're applying it to new code and to lines we change when creating new PRs. In this case:
So, please change to: if (condition) {
// stuff
} else {
// more stuff
// and more
} |
02b1c80 to
131db80
Compare
131db80 to
667ad79
Compare
|
@rodolforg No worries, makes sense |
|
Merged. |
When a group layer is selected, the time track will show waypoints for child layers in the group. Modifying one of these waypoints (remove, move, or duplicate) was also pulling in waypoints of sibling layers of the group, not just child layers, if the sibling also happened to have a waypoint at the same time.
Reproduction steps:
I'm still a bit fuzzy on the relationship between canvases and group layers. I tested that waypoints for imported files still works, but I don't know if there's another way to create a canvas object that would need to be tested as well.