diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-13 14:33:23 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-13 14:33:23 -0400 |
commit | 9766cc7d8b1d96817d2ec9b5a7ccef6f97f440f5 (patch) | |
tree | 7e564e3f2fc20083824e9c416866085585a05d47 /libs/ardour/ardour/utils.h | |
parent | eab3c57b834c3f4dbaeb5d412cdef3a672276c56 (diff) |
a better, deeper fix for "cancel all solo", as Session::cancel_all_solo()
Diffstat (limited to 'libs/ardour/ardour/utils.h')
-rw-r--r-- | libs/ardour/ardour/utils.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index 4edf9fb446..cc6e5044ce 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -187,6 +187,17 @@ template<typename T> boost::shared_ptr<ControlList> route_list_to_control_list ( return cl; } +template<typename T> boost::shared_ptr<ControlList> stripable_list_to_control_list (StripableList& sl, boost::shared_ptr<T> (Stripable::*get_control)() const) { + boost::shared_ptr<ControlList> cl (new ControlList); + for (StripableList::const_iterator s = sl.begin(); s != sl.end(); ++s) { + boost::shared_ptr<AutomationControl> ac = ((*s).get()->*get_control)(); + if (ac) { + cl->push_back (ac); + } + } + return cl; +} + #if __APPLE__ LIBARDOUR_API std::string CFStringRefToStdString(CFStringRef stringRef); #endif // __APPLE__ |