Fix #106095: FCurves not drawn when Extrapolation is disabled

Bug introduced by c2c6707919
Fixing it by undoing the changes to the if statements
at the start of the FCurve drawing functions.

This keeps the intended behavior of the previous path, while fixing the drawing

Pull Request: https://projects.blender.org/blender/blender/pulls/106100
This commit is contained in:
Christoph Lendenfeld
2023-03-24 14:18:00 +01:00
committed by Christoph Lendenfeld
parent d78550634a
commit d5d8246441

View File

@@ -704,7 +704,7 @@ static void draw_fcurve_curve_samples(bAnimContext *ac,
const uint shdr_pos,
const bool draw_extrapolation)
{
if (!draw_extrapolation) {
if (!draw_extrapolation && fcu->totvert == 1) {
return;
}
@@ -817,7 +817,7 @@ static bool fcurve_can_use_simple_bezt_drawing(FCurve *fcu)
static void draw_fcurve_curve_bezts(
bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d, uint pos, const bool draw_extrapolation)
{
if (!draw_extrapolation) {
if (!draw_extrapolation && fcu->totvert == 1) {
return;
}