summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_controller.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-29 14:32:12 -0500
committerDavid Robillard <d@drobilla.net>2014-11-29 14:32:12 -0500
commit77d5fb7a359e87a51a9eca4adf926d69bc3bdeaf (patch)
tree3954b3808fff868ee42f71f1c37e6451eb0e7c8e /gtk2_ardour/automation_controller.cc
parentc77f4b7a186e030f0295cae03f8e3c0662f77781 (diff)
Fix write for boolean automation.
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r--gtk2_ardour/automation_controller.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index a8051f0eb4..511fb0bf2f 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -162,12 +162,15 @@ AutomationController::value_adjusted ()
{
if (!_ignore_change) {
_controllable->set_value (_controllable->interface_to_internal(_adjustment->get_value()));
- } else {
- /* A bar controller will automatically follow the adjustment, but for a
- button we have to do it manually. */
- ArdourButton* but = dynamic_cast<ArdourButton*>(_widget);
- if (but) {
- but->set_active(_adjustment->get_value() >= 0.5);
+ }
+
+ /* A bar controller will automatically follow the adjustment, but for a
+ button we have to do it manually. */
+ ArdourButton* but = dynamic_cast<ArdourButton*>(_widget);
+ if (but) {
+ const bool active = _adjustment->get_value() >= 0.5;
+ if (but->get_active() != active) {
+ but->set_active(active);
}
}
}
@@ -202,6 +205,7 @@ AutomationController::toggled ()
{
ArdourButton* but = dynamic_cast<ArdourButton*>(_widget);
if (but) {
+ start_touch();
const bool was_active = _controllable->get_value() >= 0.5;
if (was_active) {
_adjustment->set_value(0.0);
@@ -210,6 +214,7 @@ AutomationController::toggled ()
_adjustment->set_value(1.0);
but->set_active(true);
}
+ end_touch();
}
}