summaryrefslogtreecommitdiff
path: root/gtk2_ardour/generic_pluginui.cc
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-07-28 22:00:58 +0200
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-07-28 23:21:09 +0200
commit535814cf987c4b2067de5afb44d2064321c61a8f (patch)
tree4b637d03f546ab60de23576204463f8d76abb502 /gtk2_ardour/generic_pluginui.cc
parent35a20a8bcc7fb01dbb9f7f04ada5ad6dd4aa268f (diff)
GenericUI: don't add all inputs to automation vector
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.
Diffstat (limited to 'gtk2_ardour/generic_pluginui.cc')
-rw-r--r--gtk2_ardour/generic_pluginui.cc13
1 files changed, 9 insertions, 4 deletions
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) {