diff options
author | David Robillard <d@drobilla.net> | 2014-12-01 19:37:05 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-01 23:35:24 -0500 |
commit | 86de0386c9aea09e1efef604c695afec7cd7845c (patch) | |
tree | bea184ebe9d88a47112367cd88dcd6532012ba76 /gtk2_ardour/automation_controller.cc | |
parent | 2b69fa6edffd9f37f7d9418e4acac467300d988a (diff) |
Fix automation write/touch.
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r-- | gtk2_ardour/automation_controller.cc | 14 |
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(); } } |