in the case of nudging (1) CP, locate the phead so we can see its position

This commit is contained in:
Ben Loftis 2024-03-11 14:45:07 -05:00
parent 46a8b547fa
commit e467e0c014
1 changed files with 8 additions and 0 deletions

View File

@ -507,6 +507,10 @@ Editor::nudge_forward (bool next, bool force_playhead)
alist->modify (m, p + distance, (*m)->value);
alist->thaw ();
_session->add_command (new MementoCommand<AutomationList> (new SimpleMementoCommandBinder<AutomationList> (*alist.get()), 0, &alist->get_state()));
if (selection->points.size()==1) {
_session->request_locate (timepos_t (p + distance).samples());
}
}
if (in_command) {
commit_reversible_command ();
@ -633,6 +637,10 @@ Editor::nudge_backward (bool next, bool force_playhead)
alist->modify (m, max (timepos_t (p.time_domain()), p.earlier (distance)), (*m)->value);
alist->thaw ();
_session->add_command (new MementoCommand<AutomationList> (new SimpleMementoCommandBinder<AutomationList> (*alist.get()), 0, &alist->get_state()));
if (selection->points.size()==1) {
_session->request_locate (timepos_t (p.earlier (distance)).samples());
}
}
if (in_command) {
commit_reversible_command ();