provisional changes to speed up solo changes to large numbers of routes.
[ardour.git] / libs / ardour / session_rtevents.cc
index 00d966acaae62d4c92cc006a1c4b6d1123969127..5f1c7a54cba0f3ffeea5a9906978d2325f263cea 100644 (file)
@@ -64,9 +64,28 @@ Session::set_control (boost::shared_ptr<AutomationControl> ac, double val, Contr
 void
 Session::rt_set_controls (boost::shared_ptr<ControlList> cl, double val, Controllable::GroupControlDisposition gcd)
 {
+       /* Note that we require that all controls in the ControlList are of the
+          same type.
+       */
+       if (cl->empty()) {
+               return;
+       }
+
        for (ControlList::iterator c = cl->begin(); c != cl->end(); ++c) {
                (*c)->set_value (val, gcd);
        }
+
+       /* some controls need global work to take place after they are set. Do
+        * that here.
+        */
+
+       switch (cl->front()->parameter().type()) {
+       case SoloAutomation:
+               update_route_solo_state ();
+               break;
+       default:
+               break;
+       }
 }
 
 void