- if (new_value != current_value) {
- actually_set_value (current_value, Controllable::UseGroup);
+ /* ..and update automation */
+ if (_list) {
+ XMLNode* before = &alist ()->get_state ();
+ if (!masters.empty()) {
+ for (ControlList::const_iterator m = masters.begin(); m != masters.end(); ++m) {
+ _list->list_merge (*(*m)->list().get(), boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, _2));
+ }
+ _list->y_transform (boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, list_ratio));
+ } else {
+ _list->y_transform (boost::bind (&SlavableAutomationControl::scale_automation_callback, this, _1, master_ratio));
+ }
+ XMLNode* after = &alist ()->get_state ();
+ if (*before != *after) {
+ _session.begin_reversible_command (string_compose (_("Merge VCA automation into %1"), name ()));
+ _session.commit_reversible_command (alist()->memento_command (before, after));
+ }
+ }