summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_control.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-17 03:10:40 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-17 03:10:40 +0000
commit3c252e9321dccf9b653b6b9ab4a7ffe5cda31b79 (patch)
treeb8afdbe754818713249fb9d14e5b8a79ab24243d /libs/ardour/automation_control.cc
parent539b94490f7ab660f24b3de80df5514f61d481b0 (diff)
lots more fidgety work on automation. sort of works now, but undo/redo needs attention
git-svn-id: svn://localhost/ardour2/branches/3.0@13047 d708f5d6-7413-0410-9779-e7cbd77b26cf
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);
}
}