From e2c06d5fc91f4f1125cf79280cb585400f6e056c Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 12 Nov 2011 05:00:24 +0000 Subject: Bugfix [#29212] Select before/after current frame deselects all channels in graph editor No need to deselect all channels when doing the select left/right operator, since we don't replace the selection afterwards with anything useful. This would be a problem when the "Only Show Selected" option is enabled (as it is by default), as this results in the curves being worked on disappearing from view. F-Curves though will still get deselected as a result of the code to deselect keyframes. Will need to review whether this is still a good idea (original intention was so that only curves with keyframes selected would remain selected). --- source/blender/editors/space_action/action_select.c | 7 +++---- source/blender/editors/space_graph/graph_select.c | 5 +++-- source/blender/editors/space_nla/nla_select.c | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index dc81fb1e8bc..f717b827a7e 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -728,8 +728,9 @@ static void actkeys_select_leftright (bAnimContext *ac, short leftright, short s if (select_mode==SELECT_REPLACE) { select_mode= SELECT_ADD; - /* deselect all other channels and keyframes */ - ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + /* - deselect all other keyframes, so that just the newly selected remain + * - channels aren't deselected, since we don't re-select any as a consequence + */ deselect_action_keys(ac, 0, SELECT_SUBTRACT); } @@ -918,8 +919,6 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se KeyframeEditFunc select_cb, ok_cb; KeyframeEditData ked= {{NULL}}; - /* initialise keyframe editing data */ - /* set up BezTriple edit callbacks */ select_cb= ANIM_editkeyframes_select(select_mode); ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAME); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index e74c7d50adc..6506933df54 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -732,8 +732,9 @@ static void graphkeys_select_leftright (bAnimContext *ac, short leftright, short if (select_mode==SELECT_REPLACE) { select_mode= SELECT_ADD; - /* deselect all other channels and keyframes */ - ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + /* - deselect all other keyframes, so that just the newly selected remain + * - channels aren't deselected, since we don't re-select any as a consequence + */ deselect_graph_keys(ac, 0, SELECT_SUBTRACT); } diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 05d38a63109..49340b31b47 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -376,8 +376,9 @@ static void nlaedit_select_leftright (bContext *C, bAnimContext *ac, short leftr if (select_mode==SELECT_REPLACE) { select_mode= SELECT_ADD; - /* deselect all other channels and keyframes */ - ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); + /* - deselect all other keyframes, so that just the newly selected remain + * - channels aren't deselected, since we don't re-select any as a consequence + */ deselect_nla_strips(ac, 0, SELECT_SUBTRACT); } -- cgit v1.2.3