color coded keyframe curves, keyframe popups, cwin scrollbar fixes
[goodguy/history.git] / cinelerra-5.1 / cinelerra / autos.C
index 36abbd7dc756041d1d1cb1a356f24bb312508a70..7ab31dd54ff3696657cae871de179406306eb203 100644 (file)
@@ -282,27 +282,17 @@ Auto* Autos::get_auto_at_position(double position)
 
 Auto* Autos::get_auto_for_editing(double position)
 {
-       if(position < 0)
-       {
+       if(position < 0) {
                position = edl->local_session->get_selectionstart(1);
        }
 
        Auto *result = 0;
        position = edl->align_to_frame(position, 0);
-
-
-
-
 //printf("Autos::get_auto_for_editing %p %p\n", first, default_auto);
 
-       if(edl->session->auto_keyframes)
-       {
-               result = insert_auto(track->to_units(position, 0));
-       }
-       else
-               result = get_prev_auto(track->to_units(position, 0),
-                       PLAY_FORWARD,
-                       result);
+       result = edl->session->auto_keyframes ?
+               insert_auto(track->to_units(position, 0)) :
+               get_prev_auto(track->to_units(position, 0), PLAY_FORWARD, result);
 
 //printf("Autos::get_auto_for_editing %p %p %p\n", default_auto, first, result);
        return result;