X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fautos.C;h=cb5a1bd265eb254ff165bd42a4c501f105614a24;hp=ced078364c5578980abe367c9324b39109f1adf9;hb=9afc3844e37c6db23435d5d0c33129dcc81061e4;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1 diff --git a/cinelerra-5.1/cinelerra/autos.C b/cinelerra-5.1/cinelerra/autos.C index ced07836..cb5a1bd2 100644 --- a/cinelerra-5.1/cinelerra/autos.C +++ b/cinelerra-5.1/cinelerra/autos.C @@ -280,7 +280,7 @@ Auto* Autos::get_auto_at_position(double position) } -Auto* Autos::get_auto_for_editing(double position) +Auto* Autos::get_auto_for_editing(double position, int create) { if(position < 0) { position = edl->local_session->get_selectionstart(1); @@ -288,7 +288,8 @@ Auto* Autos::get_auto_for_editing(double position) Auto *result = 0; get_prev_auto(track->to_units(position, 0), PLAY_FORWARD, result); - if( edl->session->auto_keyframes && (!result || result->is_default || + if( create > 0 ) create = edl->session->auto_keyframes; + if( create && (!result || result->is_default || !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); @@ -503,9 +504,6 @@ int Autos::copy(int64_t start, if(active_only || (!default_only && !active_only)) { Auto *current = autoof(start); -// need the last one if past the end - if( !current && last ) - last->copy(start, end, file, default_only); while( current && current->position <= end ) { // Want to copy single keyframes by putting the cursor on them