X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ftracksedit.C;h=1129502accdb7e1d8b62caf010991a644dd21bf5;hp=afe491f39aec9176c1581358c04fe803f385e144;hb=17c1843cd537108ae6e852546a39f15ac5e33e40;hpb=15b020d5c21b2cc5545227f7c092f06086666b4a diff --git a/cinelerra-5.1/cinelerra/tracksedit.C b/cinelerra-5.1/cinelerra/tracksedit.C index afe491f3..1129502a 100644 --- a/cinelerra-5.1/cinelerra/tracksedit.C +++ b/cinelerra-5.1/cinelerra/tracksedit.C @@ -214,28 +214,13 @@ void Tracks::set_edit_length(double start, double end, double length) // Go in using the edit handle interface int64_t starting_length = current_edit->length; - if(length_units < current_edit->length) - { - current_edit->shift_end_in(MOVE_ALL_EDITS, - current_edit->startproject + length_units, - current_edit->startproject + current_edit->length, - 1, - edl->session->labels_follow_edits, - edl->session->plugins_follow_edits, - edl->session->autos_follow_edits, - 0); - } - else - { - current_edit->shift_end_out(MOVE_ALL_EDITS, - current_edit->startproject + length_units, - current_edit->startproject + current_edit->length, - 1, - edl->session->labels_follow_edits, - edl->session->plugins_follow_edits, - edl->session->autos_follow_edits, - 0); - } + current_edit->shift_end(MOVE_RIPPLE, + current_edit->startproject + length_units, + current_edit->startproject + current_edit->length, + 0, + edl->session->autos_follow_edits, + edl->session->plugins_follow_edits, + 0); int64_t ending_length = current_edit->length; @@ -248,8 +233,6 @@ void Tracks::set_edit_length(double start, double end, double length) edl->labels->modify_handles( current_track->from_units(current_edit->startproject + starting_length), current_track->from_units(current_edit->startproject + ending_length), - 1, - MOVE_ALL_EDITS, 1); } @@ -298,42 +281,23 @@ void Tracks::set_edit_length(double start, double end, double length) // Go in using the edit handle interface int64_t starting_length = current_edit->length; - if(length_units < current_edit->length) - { - current_edit->shift_end_in(MOVE_ALL_EDITS, - current_edit->startproject + length_units, - current_edit->startproject + current_edit->length, - 1, - edl->session->labels_follow_edits, - edl->session->plugins_follow_edits, - edl->session->autos_follow_edits, - 0); - } - else - { - current_edit->shift_end_out(MOVE_ALL_EDITS, - current_edit->startproject + length_units, - current_edit->startproject + current_edit->length, - 1, - edl->session->labels_follow_edits, - edl->session->plugins_follow_edits, - edl->session->autos_follow_edits, - 0); - } + current_edit->shift_end(MOVE_RIPPLE, + current_edit->startproject + length_units, + current_edit->startproject + current_edit->length, + 0, + edl->session->autos_follow_edits, + edl->session->plugins_follow_edits, + 0); int64_t ending_length = current_edit->length; - if(edl->session->labels_follow_edits && first_track) - { -// printf("Tracks::set_edit_length %d %f %f\n", -// __LINE__, + if(edl->session->labels_follow_edits && first_track) { +// printf("Tracks::set_edit_length %d %f %f\n", __LINE__, // current_track->from_units(current_edit->startproject + starting_length), // current_track->from_units(current_edit->startproject + ending_length)); edl->labels->modify_handles( current_track->from_units(current_edit->startproject + starting_length), current_track->from_units(current_edit->startproject + ending_length), - 1, - MOVE_ALL_EDITS, 1); } @@ -1182,6 +1146,8 @@ int Tracks::modify_edithandles(double &oldposition, double &newposition, track->modify_edithandles(oldposition, newposition, currentend, handle_mode, edit_labels, edit_plugins, edit_autos, group_id); +// labels follow first armed track + edit_labels = 0; } return 0; }