- /* These controllers are region "automation", so we do not create
- * an AutomationList/Line for the track */
-
- boost::shared_ptr<AutomationTimeAxisView> track (
- new AutomationTimeAxisView (
- _session,
- _route,
- boost::shared_ptr<Automatable> (),
- boost::shared_ptr<AutomationControl> (),
- param,
- _editor,
- *this,
- true,
- parent_canvas,
- _route->describe_parameter(param)
- )
- );
+ switch (param.type()) {
+
+ case GainAutomation:
+ create_gain_automation_child (param, show);
+ break;
+
+ case PluginAutomation:
+ /* handled elsewhere */
+ break;
+
+ case MidiCCAutomation:
+ case MidiPgmChangeAutomation:
+ case MidiPitchBenderAutomation:
+ case MidiChannelPressureAutomation:
+ case MidiSystemExclusiveAutomation:
+ /* These controllers are region "automation" - they are owned
+ * by regions (and their MidiModels), not by the track. As a
+ * result we do not create an AutomationList/Line for the track
+ * ... except here we are doing something!! XXX
+ */
+
+ track.reset (new AutomationTimeAxisView (
+ _session,
+ _route,
+ boost::shared_ptr<Automatable> (),
+ boost::shared_ptr<AutomationControl> (),
+ param,
+ _editor,
+ *this,
+ true,
+ parent_canvas,
+ _route->describe_parameter(param)
+ ));