diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-01-26 17:13:42 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-01-26 17:13:42 +0300 |
commit | 26b5760d6d75cb2bc9a1d8f8158e4982972d467f (patch) | |
tree | 8fde5bc90f579cdb66210e1a187fc658cd60d90c /source/blender/editors/animation/anim_channels_edit.c | |
parent | 84671d796d4237e094046a88d938bea9ec720174 (diff) |
Fix T85038: No curve is "active" after selecting all curves
Check for selection status beforec learing the "active" flag from an
FCurve. This allows the "Select All Curves" operator to retain what is
seen as the active curve.
Diffstat (limited to 'source/blender/editors/animation/anim_channels_edit.c')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 7e54bca4c93..7afb03b833d 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -393,7 +393,11 @@ static void anim_channels_select_set(bAnimContext *ac, FCurve *fcu = (FCurve *)ale->data; ACHANNEL_SET_FLAG(fcu, sel, FCURVE_SELECTED); - fcu->flag &= ~FCURVE_ACTIVE; + if ((fcu->flag & FCURVE_SELECTED) == 0) { + /* Only erase the ACTIVE flag when deselecting. This ensures that "select all curves" + * retains the currently active curve. */ + fcu->flag &= ~FCURVE_ACTIVE; + } break; } case ANIMTYPE_SHAPEKEY: { |