X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmidi_time_axis.cc;h=af19c9b037552e93a878bb885ceebf2a6c0edea1;hb=15fa465013a2d01bcd9fbb958b02a8f818d40edc;hp=59c30c0c021cb1b15d42dc82e6d66ecf8ede453f;hpb=2b9421fd391efcddde0be3397cb66e19b744a155;p=ardour.git diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 59c30c0c02..af19c9b037 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -91,6 +91,7 @@ #include "i18n.h" using namespace ARDOUR; +using namespace ARDOUR_UI_UTILS; using namespace PBD; using namespace Gtk; using namespace Gtkmm2ext; @@ -170,6 +171,11 @@ MidiTimeAxisView::set_route (boost::shared_ptr rt) create_automation_child (GainAutomation, false); } + /* if set_state above didn't create a mute automation child, we need to make one */ + if (automation_child (MuteAutomation) == 0) { + create_automation_child (MuteAutomation, false); + } + if (_route->panner_shell()) { _route->panner_shell()->Changed.connect (*this, invalidator (*this), boost::bind (&MidiTimeAxisView::ensure_pan_views, this, false), gui_context()); } @@ -1264,6 +1270,10 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool create_gain_automation_child (param, show); break; + case MuteAutomation: + create_mute_automation_child (param, show); + break; + case PluginAutomation: /* handled elsewhere */ break; @@ -1521,8 +1531,7 @@ MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit) real_editor->snap_to (pos, 0); - boost::shared_ptr src = _session->create_midi_source_for_session ( - view()->trackview().track().get(), view()->trackview().track()->name()); + boost::shared_ptr src = _session->create_midi_source_by_stealing_name (view()->trackview().track()); PropertyList plist; plist.add (ARDOUR::Properties::start, 0);