summaryrefslogtreecommitdiff
path: root/libs/ardour/automatable.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-03-18 16:56:27 +0100
committerRobin Gareus <robin@gareus.org>2020-03-18 18:16:29 +0100
commit28f15d3fa63543a7a600e50a5663fe85c2230056 (patch)
tree5c004cdba2f7ff5fcb99e6c92c2c0e1f7dd6c4cf /libs/ardour/automatable.cc
parent66d1b513925f4a61b7a81c5aa932c6bcb0ef63a6 (diff)
Add flag to explicitly hide a control
Eventually this is to replace a literal name "hidden" that is currently used as hack throughout Ardour's codebase.
Diffstat (limited to 'libs/ardour/automatable.cc')
-rw-r--r--libs/ardour/automatable.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc
index bc5da94500..6b4c43fc3e 100644
--- a/libs/ardour/automatable.cc
+++ b/libs/ardour/automatable.cc
@@ -178,7 +178,9 @@ Automatable::add_control(boost::shared_ptr<Evoral::Control> ac)
ControlSet::add_control (ac);
if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) {
- _can_automate_list.insert (param);
+ if (!actl || !(actl->flags() & Controllable::HiddenControl)) {
+ can_automate (param);
+ }
automation_list_automation_state_changed (param, al->automation_state ()); // sync everything up
}
}
@@ -264,7 +266,9 @@ Automatable::set_automation_xml_state (const XMLNode& node, Evoral::Parameter le
boost::shared_ptr<AutomationControl> actl = automation_control (param);
if (actl && (*niter)->children().size() > 0 && Config->get_limit_n_automatables () > 0) {
actl->clear_flag (Controllable::NotAutomatable);
- can_automate (param);
+ if (!(actl->flags() & Controllable::HiddenControl) && actl->name() != X_("hidden")) {
+ can_automate (param);
+ }
info << "Marked parmater as automatable" << endl;
} else {
warning << "Ignored automation data for non-automatable parameter" << endl;