Fix toggle-processors: operate on plugins only
authorRobin Gareus <robin@gareus.org>
Thu, 13 Apr 2017 22:53:45 +0000 (00:53 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 13 Apr 2017 22:53:45 +0000 (00:53 +0200)
gtk2_ardour/processor_box.cc

index 52831ee6ac9e62e5a930627fce1f5394c48bd9c7..bd6f90ba873efa9485e219863d619269a73d5e4c 100644 (file)
@@ -2324,6 +2324,18 @@ ProcessorBox::processor_operation (ProcessorOperation op)
 
        case ProcessorsToggleActive:
                for (ProcSelection::iterator i = targets.begin(); i != targets.end(); ++i) {
+                       if (!(*i)->display_to_user ()) {
+                               assert (0); // these should not be selectable to begin with.
+                               continue;
+                       }
+                       if (!boost::dynamic_pointer_cast<PluginInsert> (*i)) {
+                               continue;
+                       }
+#ifdef MIXBUS
+                       if (boost::dynamic_pointer_cast<PluginInsert> (*i)->is_channelstrip()) {
+                               continue;
+                       }
+#endif
                        (*i)->enable (!(*i)->enabled ());
                }
                break;