diff options
author | nick_m <mainsbridge@gmail.com> | 2016-06-08 02:45:40 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-06-08 02:45:40 +1000 |
commit | 03ea905b8663ced9883892529cef6f84bcefb6fa (patch) | |
tree | 5b953ff6f87428889087b7bc67f9a88344020aa3 | |
parent | a12f62219b92f834cf97ff10444b39682858bad9 (diff) |
Step edit cursor no longer assumes constant tempo.
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/step_editor.cc | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 1e20a78fc1..76d46b86be 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -3875,7 +3875,9 @@ MidiRegionView::set_step_edit_cursor_width (Evoral::Beats beats) _step_edit_cursor_width = beats; if (_step_edit_cursor) { - _step_edit_cursor->set_x1 (_step_edit_cursor->x0() + trackview.editor().sample_to_pixel (region_beats_to_region_frames (beats))); + _step_edit_cursor->set_x1 (_step_edit_cursor->x0() + trackview.editor().sample_to_pixel ( + region_beats_to_region_frames (_step_edit_cursor_position + beats) + - region_beats_to_region_frames (_step_edit_cursor_position))); } } diff --git a/gtk2_ardour/step_editor.cc b/gtk2_ardour/step_editor.cc index 6770e1e115..8afc0ed826 100644 --- a/gtk2_ardour/step_editor.cc +++ b/gtk2_ardour/step_editor.cc @@ -324,6 +324,8 @@ StepEditor::step_add_note (uint8_t channel, uint8_t pitch, uint8_t velocity, Evo _step_edit_chord_duration = max (_step_edit_chord_duration, beat_duration); } + step_edit_region_view->set_step_edit_cursor_width (step_editor->note_length()); + return 0; } |