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.
This commit is contained in:
Bastien Montagne 2016-04-22 14:38:46 +02:00
parent f4ecd24f96
commit a2779a4606
Notes: blender-bot 2023-02-14 07:57:21 +01:00
Referenced by issue #48230, Home key when only one keyframe makes the DopeSheet acting weird.
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}