From: Carl Hetherington Date: Mon, 5 Jul 2010 01:12:49 +0000 (+0000) Subject: Fix up route group label updates. X-Git-Tag: 3.0-alpha5~1868 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=e4c6b5f01a24ae21b80943f1b46679751f7ac25b;p=ardour.git Fix up route group label updates. git-svn-id: svn://localhost/ardour2/branches/3.0@7367 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/libs/ardour/ardour/route_group_member.h b/libs/ardour/ardour/route_group_member.h index 824fd52bd3..e8ff376292 100644 --- a/libs/ardour/ardour/route_group_member.h +++ b/libs/ardour/ardour/route_group_member.h @@ -33,6 +33,7 @@ class RouteGroupMember RouteGroup* route_group () const { return _route_group; } + /** Emitted when this member joins or leaves a route group */ PBD::Signal0 route_group_changed; protected: diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 79bdd4d966..4e2f116697 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -279,6 +279,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi PBD::Signal0 Located; PBD::Signal1 RouteAdded; + /** Emitted when anything about any of our route groups changes */ PBD::Signal0 RouteGroupChanged; void queue_event (SessionEvent*); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 675cd9acfe..4fdcb6f5f9 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1902,7 +1902,6 @@ Session::add_routes (RouteList& new_routes, bool save) r->mute_changed.connect_same_thread (*this, boost::bind (&Session::route_mute_changed, this, _1)); r->output()->changed.connect_same_thread (*this, boost::bind (&Session::set_worst_io_latencies_x, this, _1, _2)); r->processors_changed.connect_same_thread (*this, boost::bind (&Session::route_processors_changed, this, _1)); - r->route_group_changed.connect_same_thread (*this, boost::bind (&Session::route_group_changed, this)); if (r->is_master()) { _master_out = r; @@ -3834,6 +3833,7 @@ Session::solo_control_mode_changed () } } +/** Called when anything about any of our route groups changes (membership, state etc.) */ void Session::route_group_changed () { diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index e91e4bddd4..6800aced51 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2251,6 +2251,10 @@ Session::add_route_group (RouteGroup* g) { _route_groups.push_back (g); route_group_added (g); /* EMIT SIGNAL */ + + g->MembershipChanged.connect_same_thread (*this, boost::bind (&Session::route_group_changed, this)); + g->PropertyChanged.connect_same_thread (*this, boost::bind (&Session::route_group_changed, this)); + set_dirty (); }