midi region view: don't show ghost note if it is not in key

This commit is contained in:
Paul Davis 2021-11-18 10:36:07 -07:00
parent 2bb880aac0
commit eb0c1984de
1 changed files with 6 additions and 0 deletions

View File

@ -3921,6 +3921,12 @@ MidiRegionView::update_ghost_note (double x, double y, uint32_t state)
_ghost_note->note()->set_channel (mtv->get_preferred_midi_channel ());
_ghost_note->note()->set_velocity (get_velocity_for_add (snapped_beats));
if (mtv->midi_track()->key().in_key (_ghost_note->note()->note())) {
_ghost_note->show ();
} else {
_ghost_note->hide ();
}
update_note (_ghost_note, false);
show_verbose_cursor (_ghost_note->note ());