Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_graph/graph_select.c')
-rw-r--r--source/blender/editors/space_graph/graph_select.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index ba684972dd7..13f2219d7af 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -1518,8 +1518,13 @@ static int mouse_graph_keys(bAnimContext *ac,
something_was_selected = true;
}
- if (!run_modal && BEZT_ISSEL_ANY(bezt) && !already_selected) {
- BKE_fcurve_active_keyframe_set(nvi->fcu, bezt);
+ if (!run_modal && BEZT_ISSEL_ANY(bezt)) {
+ const bool may_activate = !already_selected ||
+ BKE_fcurve_active_keyframe_index(nvi->fcu) ==
+ FCURVE_ACTIVE_KEYFRAME_NONE;
+ if (may_activate) {
+ BKE_fcurve_active_keyframe_set(nvi->fcu, bezt);
+ }
}
}
else if (nvi->fpt) {