X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmwindowedit.C;h=a0856008867fa8bcff934ccd1f09479d822c7415;hb=b402ed7f93de4c98e6651483eb8561cf1c37ec9a;hp=3016050ba567e6451c6357143feeea4ff74fa016;hpb=559af27994c49da1d98e085f4ac2ec1ad1d1d27c;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index 3016050b..a0856008 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -1065,10 +1065,16 @@ void MWindow::overwrite(EDL *source, int all) { FileXML file; + LocalSession *src = source->local_session; double src_start = all ? 0 : - source->local_session->get_selectionstart(); - double overwrite_len = all ? source->tracks->total_length() : - source->local_session->get_selectionend() - src_start; + src->inpoint_valid() ? src->get_inpoint() : + src->outpoint_valid() ? 0 : + src->get_selectionstart(); + double src_end = all ? source->tracks->total_length() : + src->outpoint_valid() ? src->get_outpoint() : + src->inpoint_valid() ? source->tracks->total_length() : + src->get_selectionend(); + double overwrite_len = src_end - src_start; double dst_start = edl->local_session->get_selectionstart(); double dst_len = edl->local_session->get_selectionend() - dst_start; @@ -1989,12 +1995,16 @@ void MWindow::unset_inoutpoint(int is_mwindow) void MWindow::splice(EDL *source, int all) { FileXML file; + LocalSession *src = source->local_session; undo->update_undo_before(); double source_start = all ? 0 : - source->local_session->get_selectionstart(); + src->inpoint_valid() ? src->get_inpoint() : + src->outpoint_valid() ? 0 : src->get_selectionstart(); double source_end = all ? source->tracks->total_length() : - source->local_session->get_selectionend(); + src->outpoint_valid() ? src->get_outpoint() : + src->inpoint_valid() ? source->tracks->total_length() : + src->get_selectionend(); source->copy(source_start, source_end, 1, &file, "", 1); //file.dump(); double start = edl->local_session->get_selectionstart();