- else
- if(edit_mode == MOVE_ONE_EDIT)
- {
-// Paste silence and cut
-//printf("Edit::shift_start_in 1\n");
- if(!previous)
- {
- Edit *new_edit = edits->create_edit();
- new_edit->startproject = this->startproject;
- new_edit->length = 0;
- edits->insert_before(this,
- new_edit);
- }
-//printf("Edit::shift_start_in 2 %p\n", previous);
-
- end_previous_source = previous->get_source_end(previous->startsource + previous->length + cut_length);
- if(end_previous_source > 0 &&
- previous->startsource + previous->length + cut_length > end_previous_source)
- cut_length = end_previous_source - previous->startsource - previous->length;
-
- if(cut_length < length)
- { // Move in partial
- startproject += cut_length;
- startsource += cut_length;
- length -= cut_length;
- previous->length += cut_length;
-//printf("Edit::shift_start_in 2\n");
- }
- else
- { // Clear entire edit
- cut_length = length;
- previous->length += cut_length;
- for(Edit* current_edit = this; current_edit; current_edit = current_edit->next)
- {
- current_edit->startproject += cut_length;
- }
- edits->clear_recursive(oldposition + cut_length,
- startproject + cut_length,
- edit_edits,
- edit_labels,
- edit_plugins,
- edit_autos,
- trim_edits);
- }
-//printf("Edit::shift_start_in 3\n");
- }
- else
- if(edit_mode == MOVE_NO_EDITS)
- {
- end_source = get_source_end(startsource + length + cut_length);
- if(end_source > 0 && startsource + length + cut_length > end_source)
- cut_length = end_source - startsource - length;
-
- startsource += cut_length;