summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-01-19 13:38:29 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-01-19 13:38:29 -0500
commita9ec547457bfa65655ee946063426f1ba85b6f91 (patch)
tree79989f48ffc95f71df905a38691e34007a5f4594 /libs
parent22c5cb47f794bf91ea994b5dca8ce26c05e0cdd8 (diff)
mackie: still respond to route groups visibility changes
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/session.h4
-rw-r--r--libs/ardour/session.cc4
-rw-r--r--libs/ardour/session_state.cc2
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.cc13
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.h1
5 files changed, 18 insertions, 6 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index afc93a9f76..adadaa26f4 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -349,7 +349,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
/** Emitted when a property of one of our route groups changes.
* The parameter is the RouteGroup that has changed.
*/
- PBD::Signal1<void, RouteGroup *> RouteGroupPropertyChanged;
+ PBD::Signal2<void, RouteGroup *, PBD::PropertyChange> RouteGroupPropertyChanged;
/** Emitted when a route is added to one of our route groups.
* First parameter is the RouteGroup, second is the route.
*/
@@ -1560,7 +1560,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void route_added_to_route_group (RouteGroup *, boost::weak_ptr<Route>);
void route_removed_from_route_group (RouteGroup *, boost::weak_ptr<Route>);
- void route_group_property_changed (RouteGroup *);
+ void route_group_property_changed (RouteGroup *, PBD::PropertyChange);
/* SOURCES */
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 3da7f6c071..115f720333 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -5638,9 +5638,9 @@ Session::solo_control_mode_changed ()
/** Called when a property of one of our route groups changes */
void
-Session::route_group_property_changed (RouteGroup* rg)
+Session::route_group_property_changed (RouteGroup* rg, PropertyChange pc)
{
- RouteGroupPropertyChanged (rg); /* EMIT SIGNAL */
+ RouteGroupPropertyChanged (rg, pc); /* EMIT SIGNAL */
}
/** Called when a route is added to one of our route groups */
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 13d1413b19..9df6754ba8 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2501,7 +2501,7 @@ Session::add_route_group (RouteGroup* g)
g->RouteAdded.connect_same_thread (*this, boost::bind (&Session::route_added_to_route_group, this, _1, _2));
g->RouteRemoved.connect_same_thread (*this, boost::bind (&Session::route_removed_from_route_group, this, _1, _2));
- g->PropertyChanged.connect_same_thread (*this, boost::bind (&Session::route_group_property_changed, this, g));
+ g->PropertyChanged.connect_same_thread (*this, boost::bind (&Session::route_group_property_changed, this, g, _1));
set_dirty ();
}
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 4256d9780a..e95b50b011 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
@@ -704,7 +704,7 @@ MackieControlProtocol::connect_session_signals()
// receive rude solo changed
session->SoloActive.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_solo_active_changed, this, _1), this);
// need to know if group parameters change... might be hidden.
- session->RouteGroupPropertyChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_remote_id_changed, this), this);
+ session->RouteGroupPropertyChanged.connect(session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_group_property_changed, this, _2), this);
// make sure remote id changed signals reach here
// see also notify_route_added
@@ -1259,6 +1259,17 @@ MackieControlProtocol::notify_solo_active_changed (bool active)
}
void
+MackieControlProtocol::notify_group_property_changed (PropertyChange pc)
+{
+ if (!pc.contains (Properties::hidden)) {
+ return;
+ }
+
+ /* re-pick routes to show, as if remote ID(s) had changed */
+ notify_remote_id_changed ();
+}
+
+void
MackieControlProtocol::notify_remote_id_changed()
{
{
diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h
index 55696f4a3c..df758074be 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.h
+++ b/libs/surfaces/mackie/mackie_control_protocol.h
@@ -208,6 +208,7 @@ class MackieControlProtocol
void notify_route_added_or_removed ();
void notify_route_added (ARDOUR::RouteList &);
void notify_remote_id_changed();
+ void notify_group_property_changed (PBD::PropertyChange);
void recalibrate_faders ();
void toggle_backlight ();