Step edit cursor no longer assumes constant tempo.

This commit is contained in:
nick_m 2016-06-08 02:45:40 +10:00
parent a12f62219b
commit 03ea905b86
2 changed files with 5 additions and 1 deletions

View File

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

View File

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