summaryrefslogtreecommitdiff
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
parentc77f4b7a186e030f0295cae03f8e3c0662f77781 (diff)
Fix write for boolean automation.
-rw-r--r--gtk2_ardour/automation_controller.cc17
-rw-r--r--libs/ardour/automation_control.cc9
2 files changed, 11 insertions, 15 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();
}
}
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc
index d209e733d5..e21fda6874 100644
--- a/libs/ardour/automation_control.cc
+++ b/libs/ardour/automation_control.cc
@@ -62,15 +62,6 @@ AutomationControl::set_value (double value)
{
bool to_list = _list && ((AutomationList*)_list.get())->automation_write();
- if (to_list && parameter().toggled()) {
-
- // store the previous value just before this so any
- // interpolation works right
-
-
- _list->add (get_double(), _session.transport_frame()-1);
- }
-
Control::set_double (value, _session.transport_frame(), to_list);
Changed(); /* EMIT SIGNAL */