fast drag/drop rework, modify labels in mwin->cwin locks, mods to cut/paste, marks...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / edl.C
index 6f2b7e5865f784b8b30fd580b3b63553ca83ced6..d033b8d5377c00401f16be10989748eb12494041 100644 (file)
@@ -805,8 +805,6 @@ static int dead_edit_cmp(Edit**ap, Edit**bp)
 void EDL::delete_edits(ArrayList<Edit*> *edits, int collapse)
 {
        edits->sort(dead_edit_cmp);
-       if( session->labels_follow_edits )
-               delete_edit_labels(edits, collapse);
        for( int i=0; i<edits->size(); ++i ) {
                Edit *edit = edits->get(i);
                Track *track = edit->track;
@@ -821,7 +819,8 @@ void EDL::delete_edits(ArrayList<Edit*> *edits, int collapse)
                                PluginSet *plugin_set = track->plugin_set[k];
                                plugin_set->clear(start, end, 1);
                                if( !collapse )
-                                       plugin_set->paste_silence(start, end);
+                                       plugin_set->paste_silence(start, end, 1);
+                               plugin_set->optimize();
                        }
                }
                Edit *dead_edit = edit;
@@ -830,9 +829,8 @@ void EDL::delete_edits(ArrayList<Edit*> *edits, int collapse)
                                edit->startproject -= length;
                }
                delete dead_edit;
-               track->optimize();
+               track->edits->optimize();
        }
-       optimize();
 }
 
 class Range {
@@ -912,58 +910,33 @@ void EDL::move_edit_labels(ArrayList<Edit*> *edits, double dist)
 }
 
 
-void EDL::modify_edithandles(double oldposition,
-       double newposition,
-       int currentend,
-       int handle_mode,
-       int edit_labels,
-       int edit_plugins,
-       int edit_autos)
+void EDL::modify_edithandles(double oldposition, double newposition,
+       int currentend, int handle_mode, int edit_labels,
+       int edit_plugins, int edit_autos, int group_id)
 {
-       tracks->modify_edithandles(oldposition,
-               newposition,
-               currentend,
-               handle_mode,
-               edit_labels,
-               edit_plugins,
-               edit_autos);
-       labels->modify_handles(oldposition,
-               newposition,
-               currentend,
-               handle_mode,
-               edit_labels);
-}
-
-void EDL::modify_pluginhandles(double oldposition,
-       double newposition,
-       int currentend,
-       int handle_mode,
-       int edit_labels,
-       int edit_autos,
-       Edits *trim_edits)
-{
-       tracks->modify_pluginhandles(oldposition,
-               newposition,
-               currentend,
-               handle_mode,
-               edit_labels,
-               edit_autos,
-               trim_edits);
+       tracks->modify_edithandles(oldposition, newposition,
+               currentend, handle_mode, edit_labels,
+               edit_plugins, edit_autos, group_id);
+       labels->modify_handles(oldposition, newposition,
+               currentend, handle_mode, edit_labels);
+}
+
+void EDL::modify_pluginhandles(double oldposition, double newposition,
+       int currentend, int handle_mode, int edit_labels,
+       int edit_autos, Edits *trim_edits)
+{
+       tracks->modify_pluginhandles(oldposition, newposition,
+               currentend, handle_mode, edit_labels,
+               edit_autos, trim_edits);
        optimize();
 }
 
-void EDL::paste_silence(double start,
-       double end,
-       int edit_labels,
-       int edit_plugins,
-       int edit_autos)
+void EDL::paste_silence(double start, double end,
+       int edit_labels, int edit_plugins, int edit_autos)
 {
        if( edit_labels )
                labels->paste_silence(start, end);
-       tracks->paste_silence(start,
-               end,
-               edit_plugins,
-               edit_autos);
+       tracks->paste_silence(start, end, edit_plugins, edit_autos);
 }