From a2779a460669fbf49a8b8f1acc9e8ddbc10dd7cf Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 22 Apr 2016 14:38:46 +0200 Subject: [PATCH] Fix T48230: Home key when only one keyframe makes the DopeSheet acting weird. Simply apply same minimal range as in graph editor when we get a zero one from keyframes. --- source/blender/editors/space_action/action_edit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index b69547b0506..c0947dacbf0 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -239,6 +239,11 @@ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const } } + if (fabsf(*max - *min) < 0.001f) { + *min -= 0.0005f; + *max += 0.0005f; + } + /* free memory */ ANIM_animdata_freelist(&anim_data); }