fix min speed value 0.005, fix canvas lock hang, fix reset_caches crashing on vicon...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / trackcanvas.C
index fc7283c9be31f76ba88e6dafe8a5b4178788ba07..0e42ed89109de1d18108197e4d2877d4f711f46b 100644 (file)
@@ -2842,6 +2842,8 @@ void TrackCanvas::draw_floatline(int center_pixel,
        float automation_min = mwindow->edl->local_session->automation_mins[autogrouptype];
        float automation_max = mwindow->edl->local_session->automation_maxs[autogrouptype];
        float automation_range = automation_max - automation_min;
+       if( autogrouptype == AUTOGROUPTYPE_SPEED && automation_range < SPEED_MIN )
+               automation_range = SPEED_MIN;
        for( int x=x1; x<x2; ++x ) {
 // Interpolate value between frames
                X_TO_FLOATLINE(x)
@@ -2876,6 +2878,8 @@ int TrackCanvas::test_floatline(int center_pixel,
        float automation_min = mwindow->edl->local_session->automation_mins[autogrouptype];
        float automation_max = mwindow->edl->local_session->automation_maxs[autogrouptype];
        float automation_range = automation_max - automation_min;
+       if( autogrouptype == AUTOGROUPTYPE_SPEED && automation_range < SPEED_MIN )
+               automation_range = SPEED_MIN;
        FloatAuto *previous1 = 0, *next1 = 0;
        X_TO_FLOATLINE(cursor_x);
 
@@ -3124,6 +3128,8 @@ void TrackCanvas::calculate_auto_position(double *x, double *y,
        float automation_min = mwindow->edl->local_session->automation_mins[autogrouptype];
        float automation_max = mwindow->edl->local_session->automation_maxs[autogrouptype];
        float automation_range = automation_max - automation_min;
+       if( autogrouptype == AUTOGROUPTYPE_SPEED && automation_range < SPEED_MIN )
+               automation_range = SPEED_MIN;
        FloatAuto *ptr = (FloatAuto*)current;
        *x = (double)(ptr->position - unit_start) / zoom_units;
        *y = ((ptr->get_value() - automation_min) / automation_range - 0.5) * -yscale;