diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 115733e8ed..cdee66ea9b 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -174,6 +174,7 @@ MidiRegionView::canvas_event(GdkEvent* ev) } if (delete_mod) { trackview.editor.set_midi_edit_mode(original_mode); + _mouse_state = None; delete_mod = false; } return true; diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index b073d9c678..31f9f2f576 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -523,8 +523,8 @@ MidiModel::remove_note_unlocked(const boost::shared_ptr note) { //cerr << "MidiModel " << this << " remove note " << (int)note.note() << " @ " << note.time() << endl; for(Notes::iterator n = _notes.begin(); n != _notes.end(); ++n) { - Note _n = *(*n); - Note _note =*note; + Note& _n = *(*n); + const Note& _note = *note; cerr << "======================================= " << endl; cerr << int(_n.note()) << "@" << int(_n.time()) << "[" << int(_n.channel()) << "] --" << int(_n.duration()) << "-- #" << int(_n.velocity()) << endl; cerr << int(_note.note()) << "@" << int(_note.time()) << "[" << int(_note.channel()) << "] --" << int(_note.duration()) << "-- #" << int(_note.velocity()) << endl; diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index aef011ed00..257108c818 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -477,6 +477,7 @@ SMFSource::append_event_unlocked(EventTimeUnit unit, const MIDI::Event& ev) delta_time = (uint32_t)((ev.time() - _last_ev_time) * _ppqn); } + const size_t stamp_size = write_var_len(delta_time); fwrite(ev.buffer(), 1, ev.size(), _fd);