From 4f605926c5fe8e9107c34c9cdbce13bdf46bd284 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 9 Feb 2021 17:36:38 +0100 Subject: [PATCH] Tweak automation-lane auto-display Hide lanes when touching a control when the editor is not visible or if the option is disabled. --- gtk2_ardour/editor.cc | 3 +++ gtk2_ardour/route_time_axis.cc | 3 +++ gtk2_ardour/route_time_axis.h | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index bb7efb7350..34a54cd843 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4061,6 +4061,9 @@ Editor::set_show_touched_automation (bool yn) return; } _show_touched_automation = yn; + if (!yn) { + RouteTimeAxisView::signal_ctrl_touched (); + } instant_save (); } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index bb0f0b4e00..9e1748f6fa 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -1603,6 +1603,9 @@ RouteTimeAxisView::show_touched_automation (boost::weak_ptr w } if (!_editor.show_touched_automation ()) { + if (ctrl_autohide_connection.connected ()) { + signal_ctrl_touched (); + } return; } diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index 307fbd9387..d133198aca 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -141,6 +141,8 @@ public: void meter_changed (); void effective_gain_display () { gm.effective_gain_display(); } + static sigc::signal signal_ctrl_touched; + std::string state_id() const; void show_all_automation (bool apply_to_selection = false); @@ -311,8 +313,6 @@ private: void reread_midnam (); PBD::ScopedConnectionList midnam_connection; - static sigc::signal signal_ctrl_touched; - PBD::ScopedConnection ctrl_touched_connection; sigc::connection ctrl_autohide_connection; };