remove Route::listening_via_monitor()
[ardour.git] / libs / surfaces / mackie / strip.cc
index fa36ee46b0969877a6cdcf269b07c2039ebafd70..9c3fc21bdacaa16089f26a4f5e12e100ff78b4b1 100644 (file)
 #include "ardour/debug.h"
 #include "ardour/midi_ui.h"
 #include "ardour/meter.h"
+#include "ardour/monitor_control.h"
 #include "ardour/plugin_insert.h"
 #include "ardour/pannable.h"
 #include "ardour/panner.h"
 #include "ardour/panner_shell.h"
+#include "ardour/phase_control.h"
 #include "ardour/rc_configuration.h"
 #include "ardour/route.h"
 #include "ardour/session.h"
 #include "ardour/send.h"
+#include "ardour/solo_isolate_control.h"
 #include "ardour/track.h"
 #include "ardour/midi_track.h"
 #include "ardour/user_bundle.h"
@@ -196,9 +199,7 @@ Strip::set_route (boost::shared_ptr<Route> r, bool /*with_messages*/)
        _solo->set_control (_route->solo_control());
        _mute->set_control (_route->mute_control());
 
-       _route->solo_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
-       _route->listen_changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
-
+       _route->solo_control()->Changed.connect (route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_solo_changed, this), ui_context());
        _route->mute_control()->Changed.connect(route_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_mute_changed, this), ui_context());
 
        boost::shared_ptr<AutomationControl> pan_control = _route->pan_azimuth_control();
@@ -284,7 +285,7 @@ void
 Strip::notify_solo_changed ()
 {
        if (_route && _solo) {
-               _surface->write (_solo->set_state ((_route->soloed() || _route->listening_via_monitor()) ? on : off));
+               _surface->write (_solo->set_state (_route->soloed() ? on : off));
        }
 }
 
@@ -304,7 +305,10 @@ void
 Strip::notify_record_enable_changed ()
 {
        if (_route && _recenable)  {
-               _surface->write (_recenable->set_state (_route->record_enabled() ? on : off));
+               boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<Track> (_route);
+               if (trk) {
+                       _surface->write (_recenable->set_state (trk->rec_enable_control()->get_value() ? on : off));
+               }
        }
 }