From 6959536abea78cf3f556216665599ad442dc3a12 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 10 Mar 2011 23:55:22 +0000 Subject: fix [#26452] Problem with key properties when OnlySelectedCurveKeyframes option enabled. --- source/blender/editors/space_graph/graph_select.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'source/blender/editors/space_graph/graph_select.c') diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 85a173083d9..8bec0803c5e 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -1203,14 +1203,15 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, s else if (select_mode == SELECT_ADD) nvi->fcu->flag |= FCURVE_SELECTED; } - - /* set active F-Curve (NOTE: sync the filter flags with findnearest_fcurve_vert) */ - if (nvi->fcu->flag & FCURVE_SELECTED) { - int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS); - ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nvi->fcu, ANIMTYPE_FCURVE); - } } - + + /* set active F-Curve (NOTE: sync the filter flags with findnearest_fcurve_vert) */ + /* needs to be called with (sipo->flag & SIPO_SELCUVERTSONLY) otherwise the active flag won't be set [#26452] */ + if (nvi->fcu->flag & FCURVE_SELECTED) { + int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS); + ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nvi->fcu, ANIMTYPE_FCURVE); + } + /* free temp sample data for filtering */ MEM_freeN(nvi); } -- cgit v1.2.3