From 535814cf987c4b2067de5afb44d2064321c61a8f Mon Sep 17 00:00:00 2001 From: "Julien \"_FrnchFrgg_\" RIVAUD" Date: Thu, 28 Jul 2016 22:00:58 +0200 Subject: GenericUI: don't add all inputs to automation vector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That list is used to set the automation state of all automatable controls when the global automation state is changed with the buttons at the top of the generic UI window. The controls were added to the list regardless of the automatable status, and some controls were even added multiple times: once in build_control_ui() and once in build(). Since changing the state of non-automatable controls is wrong, only add the control UI in build_control_ui() which already has the knowledge of automatable or not. --- gtk2_ardour/generic_pluginui.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc index 77a2536b1a..0a1631736d 100644 --- a/gtk2_ardour/generic_pluginui.cc +++ b/gtk2_ardour/generic_pluginui.cc @@ -272,7 +272,6 @@ GenericPluginUI::build () } control_uis.push_back(cui); - input_controls_with_automation.push_back (cui); } } @@ -835,8 +834,15 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param, control_ui->automate_button.set_sensitive (false); set_tooltip(control_ui->automate_button, _("This control cannot be automated")); } else { - control_ui->automate_button.signal_clicked.connect (sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::astate_clicked), control_ui)); - mcontrol->alist()->automation_state_changed.connect (control_connections, invalidator (*this), boost::bind (&GenericPluginUI::automation_state_changed, this, control_ui), gui_context()); + control_ui->automate_button.signal_clicked.connect (sigc::bind ( + sigc::mem_fun(*this, &GenericPluginUI::astate_clicked), + control_ui)); + mcontrol->alist()->automation_state_changed.connect ( + control_connections, + invalidator (*this), + boost::bind (&GenericPluginUI::automation_state_changed, this, control_ui), + gui_context()); + input_controls_with_automation.push_back (control_ui); } if (desc.toggled) { @@ -850,7 +856,6 @@ GenericPluginUI::build_control_ui (const Evoral::Parameter& param, automation_state_changed (control_ui); input_controls.push_back (control_ui); - input_controls_with_automation.push_back (control_ui); } else if (!is_input) { -- cgit v1.2.3