summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_control.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-11-13 22:02:07 +0100
committerRobin Gareus <robin@gareus.org>2019-11-13 22:02:07 +0100
commitdbd327e6929086c39052396c02dcb03499b1c0ee (patch)
tree385e44a7084f551301f5efd7280167ba057c7d94 /libs/ardour/automation_control.cc
parent74f8db2def120e8edb181c8008b98e8dbd242713 (diff)
Automation watch toggle buttons and enforce latch
Diffstat (limited to 'libs/ardour/automation_control.cc')
-rw-r--r--libs/ardour/automation_control.cc12
1 files 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<AutomationControl>(shared_from_this()));
- }
+ AutomationWatch::instance().add_automation_watch (boost::dynamic_pointer_cast<AutomationControl>(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<AutomationControl>(shared_from_this()));
- }
+ AutomationWatch::instance().remove_automation_watch (boost::dynamic_pointer_cast<AutomationControl>(shared_from_this()));
}
}