13
0

Stationary Playhead.

It is hard to locate/edit while playing, in this mode.
I think it needs to be an action, not a mode.
This commit is contained in:
Ben Loftis 2015-05-30 08:31:09 -05:00
parent 64586a8301
commit 3bdb40109b
2 changed files with 7 additions and 14 deletions

View File

@ -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'/>

View File

@ -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
}
}