start_note_diff_command(_("add note"));
- clear_editor_note_selection ();
note_diff_add_note (new_note, true, false);
apply_diff();
{
delete _note_diff_command;
_note_diff_command = 0;
+ trackview.editor().abort_reversible_command();
clear_editor_note_selection();
}
void
MidiRegionView::add_patch_change (framecnt_t t, Evoral::PatchChange<Evoral::Beats> const & patch)
{
- MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview);
string name = _("add patch change");
trackview.editor().begin_reversible_command (name);
c->add (MidiModel::PatchChangePtr (
new Evoral::PatchChange<Evoral::Beats> (
absolute_frames_to_source_beats (_region->position() + t),
- mtv->get_channel_for_add(), patch.program(), patch.bank()
+ patch.channel(), patch.program(), patch.bank()
)
)
);