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.
This commit is contained in:
2021-01-26 15:13:42 +01:00
parent 84671d796d
commit 26b5760d6d

View File

@@ -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: {