mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Fix automation write/touch.
This commit is contained in:
parent
2b69fa6edf
commit
86de0386c9
4 changed files with 55 additions and 49 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue