summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_controller.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-01 19:37:05 -0500
committerDavid Robillard <d@drobilla.net>2014-12-01 23:35:24 -0500
commit86de0386c9aea09e1efef604c695afec7cd7845c (patch)
treebea184ebe9d88a47112367cd88dcd6532012ba76 /gtk2_ardour/automation_controller.cc
parent2b69fa6edffd9f37f7d9418e4acac467300d988a (diff)
Fix automation write/touch.
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r--gtk2_ardour/automation_controller.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index a7922d2f00..f4a0d7d2f1 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -208,16 +208,22 @@ AutomationController::toggled ()
{
ArdourButton* but = dynamic_cast<ArdourButton*>(_widget);
if (but) {
- start_touch();
+ if (_controllable->session().transport_rolling()) {
+ if (_controllable->automation_state() == Touch) {
+ _controllable->set_automation_state(Write);
+ }
+ if (_controllable->list()) {
+ _controllable->list()->set_in_write_pass(true, false, _controllable->session().audible_frame());
+ }
+ }
const bool was_active = _controllable->get_value() >= 0.5;
- if (was_active) {
+ if (was_active && but->get_active()) {
_adjustment->set_value(0.0);
but->set_active(false);
- } else {
+ } else if (!was_active && !but->get_active()) {
_adjustment->set_value(1.0);
but->set_active(true);
}
- end_touch();
}
}