Fix #129606: inserting keys not deselecting other keys in certain case

The issue was that when inserting a key, other keys weren't deselected
even though that feature was implemented with 6ef77a0d22
That only happened if no FCurve channel was selected in the channel list.

It turns out, that the intent of using the animfilter flags from
the editor was wrong. The animfilter code already checks the editor
flags based on the `bAnimContext` that is passed in.
In fact the drawing code itself has hardcoded flags.

So the fix is to use hardcoded flags as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/129636
This commit is contained in:
Christoph Lendenfeld
2024-10-31 17:39:25 +01:00
committed by Christoph Lendenfeld
parent 5804a1cc2c
commit d31ec42d24

View File

@@ -499,18 +499,8 @@ void ANIM_deselect_keys_in_animation_editors(bContext *C)
continue;
}
ListBase anim_data = {nullptr, nullptr};
int filter = 0;
if (ac.spacetype == SPACE_GRAPH) {
SpaceGraph *graph_editor = (SpaceGraph *)ac.sl;
filter = graph_editor->ads->filterflag;
}
else {
BLI_assert(ac.spacetype == SPACE_ACTION);
SpaceAction *action_editor = (SpaceAction *)ac.sl;
filter = action_editor->ads.filterflag;
}
ANIM_animdata_filter(
&ac, &anim_data, eAnimFilter_Flags(filter), ac.data, eAnimCont_Types(ac.datatype));
eAnimFilter_Flags filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FCURVESONLY);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, eAnimCont_Types(ac.datatype));
LISTBASE_FOREACH (bAnimListElem *, ale, &anim_data) {
if (!ale->adt || !ale->adt->action) {
continue;