Respond to MMC even when synced to JACK. Fixes #3700.
[ardour.git] / libs / ardour / ardour / route_group.h
index 7dbdc1d8823a1de69ddc6b1bc8c6a1a69f319e26..215f9f6bd78a1832a660f54d18eaf765e7160142 100644 (file)
@@ -92,33 +92,10 @@ class RouteGroup : public SessionObject
        int add (boost::shared_ptr<Route>);
        int remove (boost::shared_ptr<Route>);
 
-       void apply (void (Route::*func)(void *), void *src) {
+       template<typename Function>
+       void foreach_route (Function f) {
                for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-                       ((*i).get()->*func)(src);
-               }
-       }
-
-       void apply (void (Route::*func)()) {
-               for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-                       ((*i).get()->*func)();
-               }
-       }
-
-       template<class T> void apply (void (Route::*func)(T, void *), T val, void *src) {
-               for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-                       ((*i).get()->*func)(val, src);
-               }
-       }
-
-       template<class T> void apply (void (Route::*func)(T), T val) {
-               for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-                       ((*i).get()->*func)(val);
-               }
-       }
-
-       template<class T> void foreach_route (T *obj, void (T::*func)(Route&)) {
-               for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
-                       (obj->*func)(**i);
+                       f (i->get());
                }
        }
 
@@ -135,7 +112,7 @@ class RouteGroup : public SessionObject
                changed();
        }
 
-       void make_subgroup ();
+       void make_subgroup (bool, Placement);
        void destroy_subgroup ();
 
        boost::shared_ptr<RouteList> route_list() { return routes; }