-// (skip and fauto may be NULL if fill_gangs==-1)
-
- if( fill_gangs > 0 && skip->gang ) {
- double position = skip->from_units(fauto->position);
- int autoidx = fauto->autos->autoidx;
-
- for(Track *current = mwindow->edl->tracks->first; current; current = NEXT) {
- if( (current->data_type == skip->data_type || get_double_click()) &&
- current->gang && current->record && current != skip ) {
- int64_t current_position = current->to_units(position, 1);
- FloatAutos *fade_autos = (FloatAutos*)current->automation->autos[autoidx];
- float auto_min = mwindow->edl->local_session->automation_mins[fade_autos->autogrouptype];
- float auto_max = mwindow->edl->local_session->automation_maxs[fade_autos->autogrouptype];
- FloatAuto *previous = 0, *next = 0;
- FloatAuto *keyframe = (FloatAuto*)fade_autos->get_auto_at_position(current_position);
- if( !keyframe ) {
-// create keyframe on neighbouring track at the point in time given by fauto
- float init_value = fade_autos->get_value(current_position, PLAY_FORWARD, previous, next);
- float new_value = init_value + change;
- CLAMP(new_value, auto_min, auto_max);
- keyframe = (FloatAuto*)fade_autos->insert_auto(current_position);
- keyframe->set_value(new_value);
- }
- else {
+ double position = skip->from_units(fauto->position);
+ int autoidx = fauto->autos->autoidx;
+
+ for(Track *current = mwindow->edl->tracks->first; current; current = NEXT) {
+ if( (all || current->data_type == skip->data_type) &&
+ current->gang && current->record && current != skip ) {
+ FloatAutos *fade_autos = (FloatAutos*)current->automation->autos[autoidx];
+ float auto_min = mwindow->edl->local_session->automation_mins[fade_autos->autogrouptype];
+ float auto_max = mwindow->edl->local_session->automation_maxs[fade_autos->autogrouptype];
+ int64_t current_position = current->to_units(position, 1);
+ FloatAuto *keyframe = (FloatAuto*)fade_autos->get_auto_at_position(position);
+ if( keyframe ) {