do not non-automable controls to an Automatable's list of what can be automated
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 9 Apr 2016 20:15:26 +0000 (16:15 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:40 +0000 (15:30 -0400)
libs/ardour/automatable.cc

index f85bc83e8549a49e78ce806cb4edc444ee5cc2fd..d02139b4d1507b4caf4f4fdb9c428ff69ca6cb00 100644 (file)
@@ -148,7 +148,9 @@ Automatable::add_control(boost::shared_ptr<Evoral::Control> ac)
 
        boost::shared_ptr<AutomationList> al = boost::dynamic_pointer_cast<AutomationList> (ac->list ());
 
-       if (al) {
+       boost::shared_ptr<AutomationControl> actl (boost::dynamic_pointer_cast<AutomationControl> (ac));
+
+       if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) {
                al->automation_state_changed.connect_same_thread (
                        _list_connections,
                        boost::bind (&Automatable::automation_list_automation_state_changed,
@@ -157,7 +159,7 @@ Automatable::add_control(boost::shared_ptr<Evoral::Control> ac)
 
        ControlSet::add_control (ac);
 
-       if (al) {
+       if ((!actl || !(actl->flags() & Controllable::NotAutomatable)) && al) {
                _can_automate_list.insert (param);
                automation_list_automation_state_changed (param, al->automation_state ()); // sync everything up
        }