X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fautos.C;h=d08aae57aef58e609e4962bea2ac48ebc76c69f9;hp=73e89a917ceb448f5510379ecea05f6a63e74987;hb=84ac8a2bb3357c04a3f67cf763b0f61ddbbd021d;hpb=2951f82f2d7e8edf91b42f610266fd84919dd5ef diff --git a/cinelerra-5.1/cinelerra/autos.C b/cinelerra-5.1/cinelerra/autos.C index 73e89a91..d08aae57 100644 --- a/cinelerra-5.1/cinelerra/autos.C +++ b/cinelerra-5.1/cinelerra/autos.C @@ -265,7 +265,7 @@ int Autos::auto_exists_for_editing(double position) Auto* Autos::get_auto_at_position(double position) { - int64_t unit_position = track->to_units(position, 0); + int64_t unit_position = track->to_units(position, 1); for(Auto *current = first; current; @@ -290,7 +290,7 @@ Auto* Autos::get_auto_for_editing(double position, int create) get_prev_auto(track->to_units(position, 0), PLAY_FORWARD, result); if( create > 0 ) create = edl->session->auto_keyframes; if( create && (!result || result->is_default || - !EQUIV(track->from_units(result->position), position)) ) { + !EQUIV(track->from_units(result->position), position)) ) { //printf("Autos::get_auto_for_editing %p %p %p\n", default_auto, first, result); position = edl->align_to_frame(position, 0); result = insert_auto(track->to_units(position, 0)); @@ -383,10 +383,11 @@ Auto* Autos::insert_auto(int64_t position, Auto *templ) // Set curve mode if( !templ && result->is_floatauto() ) { FloatAuto *floatauto = (FloatAuto *)result; - floatauto->curve_mode = + FloatAuto::t_mode new_mode = edl->local_session->playback_start >= 0 && edl->local_session->playback_end < 0 ? FloatAuto::SMOOTH : (FloatAuto::t_mode) edl->local_session->floatauto_type; + floatauto->change_curve_mode(new_mode, 0); } } else