diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 9bbcc8e749..802e3d91cc 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -232,8 +232,13 @@ AutomationTimeAxisView::AutomationTimeAxisView ( /* add the buttons */ controls_table.set_border_width (0); controls_table.attach (hide_button, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); - controls_table.attach (name_label, 2, 3, 1, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 2, 0); - controls_table.attach (auto_dropdown, 3, 4, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + + if (show_automation_controls()) { + controls_table.attach (name_label, 2, 3, 1, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 2, 0); + controls_table.attach (auto_dropdown, 3, 4, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0); + } else { + controls_table.attach (name_label, 3, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 2, 0); + } Gtk::DrawingArea *blank0 = manage (new Gtk::DrawingArea()); Gtk::DrawingArea *blank1 = manage (new Gtk::DrawingArea()); @@ -274,7 +279,7 @@ AutomationTimeAxisView::AutomationTimeAxisView ( name_label.show (); hide_button.show (); - if (_controller) { + if (show_automation_controls() && _controller) { _controller->disable_vertical_scroll (); controls_table.attach (*_controller.get(), 2, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0); } @@ -312,6 +317,12 @@ AutomationTimeAxisView::~AutomationTimeAxisView () CatchDeletion (this); } +bool +AutomationTimeAxisView::show_automation_controls() const +{ + return (_parameter.type() != MidiVelocityAutomation) || (velocity_mode() != VelocityModeLollipops); +} + void AutomationTimeAxisView::add_contents (bool show_regions) { diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h index 4f235a5081..d122255375 100644 --- a/gtk2_ardour/automation_time_axis.h +++ b/gtk2_ardour/automation_time_axis.h @@ -232,6 +232,8 @@ protected: VelocityMode _velocity_mode; + bool show_automation_controls () const; + private: int set_state_2X (const XMLNode &, int); };