diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2015-05-30 08:31:09 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2015-05-30 08:31:09 -0500 |
commit | 3bdb40109ba696dd336872e53e58314df28af8ef (patch) | |
tree | 10865380fd20274fdc94786334e7e4fd79023e73 /gtk2_ardour | |
parent | 64586a8301e964271ba1181f292847345bc4117e (diff) |
Stationary Playhead.
It is hard to locate/edit while playing, in this mode.
I think it needs to be an action, not a mode.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour.menus.in | 3 | ||||
-rw-r--r-- | 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 @@ <menu name='Transport' action='Transport'> <menuitem action='ToggleRoll'/> <menu action="PlayMenu"> +#if 0 + <menuitem action='toggle-stationary-playhead'/> +#endif <menuitem action='PlaySelection'/> <menuitem action='PlayPreroll'/> <menuitem action='ToggleRollMaybe'/> 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 } } |