diff options
author | Carl Hetherington <carl@carlh.net> | 2011-11-03 00:42:16 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-11-03 00:42:16 +0000 |
commit | 22d87a18dc602ef29a82f5c1fa68ba00ecacfe4b (patch) | |
tree | e726f9cb19487b1945ee1dc30b18463b429ac6f5 /gtk2_ardour/mixer_strip.cc | |
parent | bcac4f1c96c6c5d67a145c38d2cb56429f0040da (diff) |
Tidy up send-to button handling a bit, should fix #4426 and #4427.
git-svn-id: svn://localhost/ardour2/branches/3.0@10406 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/mixer_strip.cc')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 7021e06b4e..4f4d400a56 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -73,8 +73,6 @@ using namespace Gtk; using namespace Gtkmm2ext; using namespace std; -sigc::signal<void,boost::shared_ptr<Route> > MixerStrip::SwitchIO; - int MixerStrip::scrollbar_height = 0; PBD::Signal1<void,MixerStrip*> MixerStrip::CatchDeletion; @@ -331,8 +329,6 @@ MixerStrip::init () set_flags (get_flags() | Gtk::CAN_FOCUS); - SwitchIO.connect (sigc::mem_fun (*this, &MixerStrip::switch_io)); - AudioEngine::instance()->PortConnectedOrDisconnected.connect ( *this, invalidator (*this), boost::bind (&MixerStrip::port_connected_or_disconnected, this, _1, _3), gui_context () ); @@ -1647,36 +1643,21 @@ MixerStrip::meter_changed () gpm.reset_peak_display(); } +/** The bus that we are displaying sends to has changed, or been turned off. + * @param send_to New bus that we are displaying sends to, or 0. + */ void -MixerStrip::switch_io (boost::shared_ptr<Route> target) +MixerStrip::bus_send_display_changed (boost::shared_ptr<Route> send_to) { - /* don't respond to switch IO signal outside of the mixer window */ - - if (!_mixer_owned) { - return; - } - - if (_route == target || _route->is_master()) { - /* don't change the display for the target or the master bus */ - return; - } else if (!is_track() && show_sends_button) { - /* make sure our show sends button is inactive, and we no longer blink, - since we're not the target. - */ - send_blink_connection.disconnect (); - show_sends_button->unset_active_state (); - } - - if (!target) { - /* switch back to default */ - revert_to_default_display (); - return; - } + RouteUI::bus_send_display_changed (send_to); - boost::shared_ptr<Send> send = _route->internal_send_for (target); - - if (send) { - show_send (send); + if (send_to) { + boost::shared_ptr<Send> send = _route->internal_send_for (send_to); + if (send) { + show_send (send); + } else { + revert_to_default_display (); + } } else { revert_to_default_display (); } @@ -1755,10 +1736,6 @@ MixerStrip::show_send (boost::shared_ptr<Send> send) void MixerStrip::revert_to_default_display () { - if (show_sends_button) { - show_sends_button->unset_active_state (); - } - drop_send (); set_current_delivery (_route->main_outs ()); |