summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_region.cc
diff options
context:
space:
mode:
authorDavid Robillard <drobilla@leibniz.local>2014-12-19 18:09:36 -0500
committerDavid Robillard <drobilla@leibniz.local>2014-12-20 01:13:25 -0500
commit5d8021bf44c066ad9b5ee4e8ab824267824be738 (patch)
treeb2ebd105b0057f23fb5d59e7504c2fbd8e026621 /libs/ardour/midi_region.cc
parentdb92d62c95773d78282e752df7589cc6b8b721c3 (diff)
Maintain correct tracker state on MIDI overwrite.
This is a little hard-edged in that edits while rolling will prematurely chop off any playing notes, but at least the state of things actually reflects reality. More sophisticated solution hopefully to come...
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r--libs/ardour/midi_region.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc
index f79e5ef203..e94e4e4854 100644
--- a/libs/ardour/midi_region.cc
+++ b/libs/ardour/midi_region.cc
@@ -414,6 +414,12 @@ MidiRegion::model_changed ()
void
MidiRegion::model_contents_changed ()
{
+ {
+ /* Invalidate source iterator to force reading new contents even if the
+ calls to read progress linearly. */
+ Glib::Threads::Mutex::Lock lm (midi_source(0)->mutex());
+ midi_source(0)->invalidate (lm);
+ }
send_change (PropertyChange (Properties::midi_data));
}