transition length popup rework
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / edits.C
index fcf8c214f784930a3d57511db9fe85d66e04689d..9e3c2a5efcd63a0d52b3cf42df26935420d9fd72 100644 (file)
@@ -682,8 +682,7 @@ int Edits::clear_handle(double start, double end,
 // Lengthen effects
                                        if(edit_plugins)
                                                track->shift_effects(current_edit->next->startproject,
-                                                       length,
-                                                       edit_autos);
+                                                               length, edit_autos, 0);
 
                                        for(current_edit = current_edit->next; current_edit; current_edit = current_edit->next)
                                        {
@@ -731,32 +730,10 @@ int Edits::modify_handles(double oldposition, double newposition, int currentend
                                double delta = newposition - oldposition;
                                oldposition = track->from_units(current_edit->startproject);
                                if( group_id > 0 ) newposition = oldposition + delta;
+                               current_edit->shift_start(edit_mode,
+                                       track->to_units(newposition, 0), track->to_units(oldposition, 0),
+                                       edit_labels, edit_autos, edit_plugins, trim_edits);
                                result = 1;
-
-                               if( newposition >= oldposition ) {
-//printf("Edits::modify_handle 1 %s %f %f\n", track->title, oldposition, newposition);
-// shift start of edit in
-                                       current_edit->shift_start_in(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
-                               }
-                               else {
-//printf("Edits::modify_handle 2 %s\n", track->title);
-// move start of edit out
-                                       current_edit->shift_start_out(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
-                               }
                        }
 
                        if(!result) current_edit = current_edit->next;
@@ -774,34 +751,9 @@ int Edits::modify_handles(double oldposition, double newposition, int currentend
                                if( group_id > 0 ) newposition = oldposition + delta;
                                result = 1;
 
-//printf("Edits::modify_handle 3\n");
-                               if(newposition <= oldposition) {
-// shift end of edit in
-//printf("Edits::modify_handle 4\n");
-                                       current_edit->shift_end_in(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
-//printf("Edits::modify_handle 5\n");
-                               }
-                               else
-                               {
-// move end of edit out
-//printf("Edits::modify_handle %d edit_mode=%d\n", __LINE__, edit_mode);
-                                       current_edit->shift_end_out(edit_mode,
-                                               track->to_units(newposition, 0),
-                                               track->to_units(oldposition, 0),
-                                               edit_edits,
-                                               edit_labels,
-                                               edit_plugins,
-                                               edit_autos,
-                                               trim_edits);
-//printf("Edits::modify_handle 7\n");
-                               }
+                               current_edit->shift_end(edit_mode,
+                                       track->to_units(newposition, 0), track->to_units(oldposition, 0),
+                                       edit_labels, edit_autos, edit_plugins, trim_edits);
                        }
 
                        if(!result) current_edit = current_edit->next;
@@ -862,6 +814,6 @@ void Edits::shift_keyframes_recursive(int64_t position, int64_t length)
 
 void Edits::shift_effects_recursive(int64_t position, int64_t length, int edit_autos)
 {
-       track->shift_effects(position, length, edit_autos);
+       track->shift_effects(position, length, edit_autos, 0);
 }