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();