summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_control.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/automation_control.cc')
-rw-r--r--libs/ardour/automation_control.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc
index 237d51a9d3..83b7db34be 100644
--- a/libs/ardour/automation_control.cc
+++ b/libs/ardour/automation_control.cc
@@ -60,7 +60,6 @@ void
AutomationControl::set_value (double value)
{
bool to_list = _list && ((AutomationList*)_list.get())->automation_write();
- bool erase_since_last = _session.transport_rolling();
if (to_list && parameter().toggled()) {
@@ -68,15 +67,14 @@ AutomationControl::set_value (double value)
// interpolation works right
- _list->add (get_double(), _session.transport_frame()-1, erase_since_last);
+ _list->add (get_double(), _session.transport_frame()-1);
}
- Control::set_double (value, _session.transport_frame(), to_list, erase_since_last);
+ Control::set_double (value, _session.transport_frame(), to_list);
Changed(); /* EMIT SIGNAL */
}
-
void
AutomationControl::set_list (boost::shared_ptr<Evoral::ControlList> list)
{
@@ -91,17 +89,24 @@ AutomationControl::set_automation_state (AutoState as)
cerr << name() << " setting automation state to " << enum_2_string (as) << endl;
+ alist()->set_automation_state (as);
+
if (as == Write) {
AutomationWatch::instance().add_automation_watch (shared_from_this());
} else if (as == Touch) {
if (!touching()) {
AutomationWatch::instance().remove_automation_watch (shared_from_this());
+ } else {
+ /* this seems unlikely, but the combination of
+ * a control surface and the mouse could make
+ * it possible to put the control into Touch
+ * mode *while* touching it.
+ */
+ AutomationWatch::instance().add_automation_watch (shared_from_this());
}
} else {
AutomationWatch::instance().remove_automation_watch (shared_from_this());
}
-
- alist()->set_automation_state (as);
}
}