X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindow.C;h=451c71320e3be4f4794fb9483b9c89f1abbed6a4;hb=717c4ad1dac14387ac7519228b904026a3a7d493;hp=d1ea6b03cc199c99cf8016d99fa8da3ce062697d;hpb=b55798fc64eee00c6fab3b4763e791befb7275f9;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/vwindow.C b/cinelerra-5.1/cinelerra/vwindow.C index d1ea6b03..451c7132 100644 --- a/cinelerra-5.1/cinelerra/vwindow.C +++ b/cinelerra-5.1/cinelerra/vwindow.C @@ -212,10 +212,10 @@ void VWindow::change_source(Indexable *indexable) if( playback_engine->is_playing_back ) stop_playback(1); - gui->lock_window("VWindow::change_source 2"); // if(asset && this->asset && // asset->id == this->asset->id && // asset == this->asset) return; + gui->lock_window("VWindow::change_source 2"); //printf("VWindow::change_source %d\n", __LINE__); @@ -414,15 +414,21 @@ void VWindow::unset_inoutpoint() } } -void VWindow::copy() +void VWindow::copy(int all) { EDL *edl = get_edl(); if(edl) { - double start = edl->local_session->get_selectionstart(); - double end = edl->local_session->get_selectionend(); + double start = all ? 0 : + edl->local_session->get_selectionstart(); + double end = all ? edl->tracks->total_length() : + edl->local_session->get_selectionend(); + EDL *copy_edl = new EDL; // no parent or assets wont be copied + copy_edl->create_objects(); + copy_edl->copy_all(edl); FileXML file; - edl->copy(start, end, 0, &file, "", 1); + copy_edl->copy(start, end, 0, &file, "", 1); + copy_edl->remove_user(); const char *file_string = file.string(); long file_length = strlen(file_string); mwindow->gui->lock_window();