From dbd327e6929086c39052396c02dcb03499b1c0ee Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 13 Nov 2019 22:02:07 +0100 Subject: Automation watch toggle buttons and enforce latch --- libs/ardour/automation_control.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 9348343ad1..eb57ecbdb3 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -289,9 +289,7 @@ AutomationControl::start_touch (double when) */ AutomationControl::actually_set_value (get_value (), Controllable::NoGroup); alist()->start_touch (when); - if (!_desc.toggled) { - AutomationWatch::instance().add_automation_watch (boost::dynamic_pointer_cast(shared_from_this())); - } + AutomationWatch::instance().add_automation_watch (boost::dynamic_pointer_cast(shared_from_this())); set_touching (true); } } @@ -306,14 +304,16 @@ AutomationControl::stop_touch (double when) if (alist()->automation_state() == Latch && _session.transport_rolling ()) { return; } + if (alist()->automation_state() == Touch && _desc.toggled) { + /* Toggle buttons always latch */ + return; + } set_touching (false); if (alist()->automation_state() & (Touch | Latch)) { alist()->stop_touch (when); - if (!_desc.toggled) { - AutomationWatch::instance().remove_automation_watch (boost::dynamic_pointer_cast(shared_from_this())); - } + AutomationWatch::instance().remove_automation_watch (boost::dynamic_pointer_cast(shared_from_this())); } } -- cgit v1.2.3