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();
}
}
// Show unless message is beyond the region bounds
- if (time - _region->start() >= _region->length() || time < _region->start()) {
- sysex->hide();
- } else {
- sysex->show();
- }
+// XXX REQUIRES APPROPRIATE OPERATORS FOR Evoral::Beats and framepos? say what?
+#warning paul fix this
+// if (time - _region->start() >= _region->length() || time < _region->start()) {
+// sysex->hide();
+// } else {
+// sysex->show();
+// }
}
}
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()
)
)
);
} else {
/* find end of latest note selected, select all between that and the start of "ev" */
- Evoral::Beats earliest = Evoral::MaxBeats;
+ Evoral::Beats earliest = std::numeric_limits<Evoral::Beats>::max();
Evoral::Beats latest = Evoral::Beats();
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
Evoral::Beats
MidiRegionView::earliest_in_selection ()
{
- Evoral::Beats earliest = Evoral::MaxBeats;
+ Evoral::Beats earliest = std::numeric_limits<Evoral::Beats>::max();
for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) {
if ((*i)->note()->time() < earliest) {