From 3bdb40109ba696dd336872e53e58314df28af8ef Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Sat, 30 May 2015 08:31:09 -0500 Subject: [PATCH] Stationary Playhead. It is hard to locate/edit while playing, in this mode. I think it needs to be an action, not a mode. --- gtk2_ardour/ardour.menus.in | 3 +++ gtk2_ardour/editor.cc | 18 ++++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/gtk2_ardour/ardour.menus.in b/gtk2_ardour/ardour.menus.in index 46372dd5b3..9b51920b32 100644 --- a/gtk2_ardour/ardour.menus.in +++ b/gtk2_ardour/ardour.menus.in @@ -54,6 +54,9 @@ +#if 0 + +#endif diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 3ba612efde..fe5e1a6b98 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -5688,24 +5688,14 @@ Editor::super_rapid_screen_update () } else { - /* don't do continuous scroll till the new position is in the rightmost quarter of the - editor canvas - */ -#if 0 - // FIXME DO SOMETHING THAT WORKS HERE - this is 2.X code - double target = ((double)frame - (double)current_page_samples()/2.0) / samples_per_pixel; + framepos_t const frame = playhead_cursor->current_frame (); + double target = ((double)frame - (double)current_page_samples()/3.0); if (target <= 0.0) { target = 0.0; } - if (fabs(target - current) < current_page_samples() / samples_per_pixel) { - target = (target * 0.15) + (current * 0.85); - } else { - /* relax */ - } + reset_x_origin (target); + - current = target; - set_horizontal_position (current); -#endif } }