+void TrackCanvas::draw_keyframe_reticle()
+{
+ int keyframe_hairline = mwindow->preferences->keyframe_reticle;
+ if( keyframe_hairline == HAIRLINE_NEVER ) return;
+
+ int current_op = mwindow->session->current_operation, dragging = 0;
+ for( int i=0; !dragging && i<AUTOMATION_TOTAL; ++i )
+ if( current_op == auto_operations[i] ) dragging = 1;
+
+ if( keyframe_hairline == HAIRLINE_DRAGGING && dragging ) {
+ if( mwindow->session->drag_auto && get_buttonpress() == 1 ) {
+ draw_hairline(mwindow->session->drag_auto, RED);
+ return;
+ }
+ }
+
+ if( keyframe_hairline == HAIRLINE_ALWAYS || ( get_buttonpress() == 2 &&
+ keyframe_hairline == HAIRLINE_DRAGGING && dragging ) ) {
+ for( Track *track = mwindow->edl->tracks->first; track;
+ track=track->next ) {
+ Automation *automation = track->automation;
+ for( int i=0; i<AUTOMATION_TOTAL; ++i ) {
+ if( !mwindow->edl->session->auto_conf->autos[i] ) continue;
+ // automation visible
+ Autos *autos = automation->autos[i];
+ if( !autos ) continue;
+ for( Auto *auto_keyframe=autos->first; auto_keyframe;
+ auto_keyframe = auto_keyframe->next ) {
+ draw_hairline(auto_keyframe, GREEN);
+ }
+ }
+
+ if( dragging && mwindow->session->drag_auto ) {
+ draw_hairline(mwindow->session->drag_auto, RED);
+ }
+ }
+ }
+}
+