Mackie Control Surface: Correctly handle the Monitor section being removed.
Adding a Monitor section updated the surface but removing one did not.
This commit is contained in:
@@ -732,6 +732,8 @@ 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);
|
||||
|
||||
session->MonitorBusAddedOrRemoved.connect (session_connections, MISSING_INVALIDATOR, boost::bind (&MackieControlProtocol::notify_monitor_added_or_removed, this), this);
|
||||
|
||||
// make sure remote id changed signals reach here
|
||||
// see also notify_stripable_added
|
||||
Sorted sorted = get_sorted_stripables();
|
||||
@@ -1245,15 +1247,6 @@ void MackieControlProtocol::notify_parameter_changed (std::string const & p)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::notify_stripable_removed ()
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
||||
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
|
||||
(*s)->master_monitor_may_have_changed ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::notify_vca_added (ARDOUR::VCAList& vl)
|
||||
{
|
||||
@@ -1272,15 +1265,6 @@ MackieControlProtocol::notify_routes_added (ARDOUR::RouteList & rl)
|
||||
}
|
||||
}
|
||||
|
||||
/* special case: single route, and it is the monitor or master out */
|
||||
|
||||
if (rl.size() == 1 && (rl.front()->is_monitor() || rl.front()->is_master())) {
|
||||
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
||||
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
|
||||
(*s)->master_monitor_may_have_changed ();
|
||||
}
|
||||
}
|
||||
|
||||
// currently assigned banks are less than the full set of
|
||||
// strips, so activate the new strip now.
|
||||
|
||||
@@ -1289,6 +1273,15 @@ MackieControlProtocol::notify_routes_added (ARDOUR::RouteList & rl)
|
||||
// otherwise route added, but current bank needs no updating
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::notify_monitor_added_or_removed ()
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
||||
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
|
||||
(*s)->master_monitor_may_have_changed ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MackieControlProtocol::notify_solo_active_changed (bool active)
|
||||
{
|
||||
|
||||
@@ -182,9 +182,9 @@ class MackieControlProtocol
|
||||
void handle_button_event (Mackie::Surface&, Mackie::Button& button, Mackie::ButtonState);
|
||||
|
||||
void notify_subview_stripable_deleted ();
|
||||
void notify_stripable_removed ();
|
||||
void notify_routes_added (ARDOUR::RouteList &);
|
||||
void notify_vca_added (ARDOUR::VCAList &);
|
||||
void notify_monitor_added_or_removed ();
|
||||
|
||||
void notify_presentation_info_changed(PBD::PropertyChange const &);
|
||||
|
||||
|
||||
@@ -321,7 +321,6 @@ Strip::notify_record_enable_changed ()
|
||||
void
|
||||
Strip::notify_stripable_deleted ()
|
||||
{
|
||||
_surface->mcp().notify_stripable_removed ();
|
||||
_surface->mcp().refresh_current_bank();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user