mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
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"
This commit is contained in:
parent
741428b6fd
commit
b7e645ec61
1 changed files with 6 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue