proxy images, add beep on proxy auto_load, fix unnest proxy bug, vwin in/out to_clip bug
[goodguy/history.git] / cinelerra-5.1 / cinelerra / mwindowedit.C
index e5d90c6b52e23ef8cef4f96cadacee22f5f4cb5a..4e5ec2886b7a617577c261a83f9c9350672746b6 100644 (file)
@@ -2091,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();