summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-04-13 10:29:07 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-04-14 02:17:30 -0400
commit343b06d8d3522d6b017d887ca754c91aec2430fd (patch)
tree81aa51fa0fea6826e62480314c1ac78b112b3a9a /gtk2_ardour/midi_time_axis.cc
parentd2a31ab6eed8b3e8f34dbc1caf2285bb64777f55 (diff)
dramatic change in logic and naming for operations related to adding a MIDI region on demand and cloning/unlinking
Existing code would cause data loss due to creation of two Source objects referring the same path, one with removable flags and one without. Careful code review suggested a variety of thinkos, function naming problems and other confusion that caused this. I have tried ot extensively comment what is going on with these operations, because it is one key area in which MIDI differs from audio: with audio, capture is the only way to add a new audio region, but for MIDI there are GUI input events that can add a new region.
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 59c30c0c02..8ced280661 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -1521,8 +1521,7 @@ MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit)
real_editor->snap_to (pos, 0);
- boost::shared_ptr<Source> src = _session->create_midi_source_for_session (
- view()->trackview().track().get(), view()->trackview().track()->name());
+ boost::shared_ptr<Source> src = _session->create_midi_source_by_stealing_name (view()->trackview().track());
PropertyList plist;
plist.add (ARDOUR::Properties::start, 0);