make bar-resync button in step editor work (move insertion point to next bar boundary)
git-svn-id: svn://localhost/ardour2/branches/3.0@7543 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1018368aef
commit
355c079f10
@ -1093,6 +1093,14 @@ MidiTimeAxisView::step_edit_beat_sync ()
|
||||
void
|
||||
MidiTimeAxisView::step_edit_bar_sync ()
|
||||
{
|
||||
if (!_session || !step_edit_region_view || !step_edit_region) {
|
||||
return;
|
||||
}
|
||||
|
||||
nframes64_t fpos = step_edit_region->position() +
|
||||
step_edit_region_view->beats_to_frames (step_edit_beat_pos);
|
||||
fpos = _session->tempo_map().round_to_bar (fpos, 1);
|
||||
step_edit_beat_pos = ceil (step_edit_region_view->frames_to_beats (fpos - step_edit_region->position()));
|
||||
}
|
||||
|
||||
boost::shared_ptr<Region>
|
||||
|
@ -394,4 +394,5 @@ StepEntry::beat_resync_click ()
|
||||
void
|
||||
StepEntry::bar_resync_click ()
|
||||
{
|
||||
_mtv->step_edit_bar_sync ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user