summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-06-27 19:04:38 +0200
committerRobin Gareus <robin@gareus.org>2016-06-27 19:04:38 +0200
commitb7e645ec61ab531917a03cdab14a8c22670677f7 (patch)
tree84aabe30a0a682d414b3bb14e1207cd8c5c4c4af
parent741428b6fde72d7d33edd15742948bfcc20f8d01 (diff)
switching to "touch" implies existing automation.
This fixes an issue of Fader jumping to unity when switching from manual to touch if there is no prior automation. Likewise for plugin parameters jumping to "default"
-rw-r--r--libs/ardour/automation_control.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc
index 2be0538229..e0ebc00062 100644
--- a/libs/ardour/automation_control.cc
+++ b/libs/ardour/automation_control.cc
@@ -144,6 +144,8 @@ AutomationControl::set_automation_state (AutoState as)
}
if (_list && as != alist()->automation_state()) {
+ const double val = get_value ();
+
alist()->set_automation_state (as);
if (_desc.toggled) {
return; // No watch for boolean automation
@@ -152,6 +154,10 @@ AutomationControl::set_automation_state (AutoState as)
if (as == Write) {
AutomationWatch::instance().add_automation_watch (shared_from_this());
} else if (as == Touch) {
+ if (alist()->empty()) {
+ Control::set_double (val, _session.transport_frame(), true);
+ Changed (true, Controllable::NoGroup);
+ }
if (!touching()) {
AutomationWatch::instance().remove_automation_watch (shared_from_this());
} else {