X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fmwindowedit.C;h=4e5ec2886b7a617577c261a83f9c9350672746b6;hb=08284a3a20b2cc8606dd90c3c147e2c31d301a61;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..4e5ec288 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(); @@ -2081,14 +2091,16 @@ void MWindow::save_clip(EDL *new_edl, const char *txt) void MWindow::to_clip(EDL *edl, const char *txt, int all) { FileXML file; - double start, end; + LocalSession *src = edl->local_session; gui->lock_window("MWindow::to_clip 1"); - start = all ? 0 : - edl->local_session->get_selectionstart(); - end = all ? edl->tracks->total_length() : - edl->local_session->get_selectionend(); - + double start = all ? 0 : + src->inpoint_valid() ? src->get_inpoint() : + src->outpoint_valid() ? 0 : src->get_selectionstart(); + double end = all ? edl->tracks->total_length() : + src->outpoint_valid() ? src->get_outpoint() : + src->inpoint_valid() ? edl->tracks->total_length() : + src->get_selectionend(); if( EQUIV(end, start) ) { start = 0; end = edl->tracks->total_length(); @@ -2319,12 +2331,6 @@ void MWindow::rescale_proxy(EDL *clip, int orig_scale, int new_scale) edl->rescale_proxy(orig_scale, new_scale); } -void MWindow::set_proxy(int use_scaler, int new_scale, int auto_scale, - ArrayList *orig_assets, ArrayList *proxy_assets) -{ - edl->set_proxy(use_scaler, new_scale, auto_scale, orig_assets, proxy_assets); -} - void MWindow::add_proxy(int use_scaler, ArrayList *orig_assets, ArrayList *proxy_assets) {