From 250da353d4bb6c03d645a96431e2fc7cc1ae4406 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 15 Apr 2020 20:21:27 +0200 Subject: Disable spill when target-bus is removed #8014 Individual mixer-strip already revert to default display when the send vanishes. This also resets the mixer view. --- gtk2_ardour/mixer_ui.cc | 29 ++++++++++++++++++++--------- gtk2_ardour/mixer_ui.h | 3 +++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 1e2dd71b37..20dadf672f 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -3477,16 +3477,27 @@ void Mixer_UI::show_spill (boost::shared_ptr s) { boost::shared_ptr ss = spilled_strip.lock(); - if (ss != s) { - spilled_strip = s; - show_spill_change (s); /* EMIT SIGNAL */ - if (s) { - _group_tabs->hide (); - } else { - _group_tabs->show (); - } - redisplay_track_list (); + if (ss == s) { + return; + } + + spilled_strip = s; + _spill_gone_connection.disconnect (); + show_spill_change (s); /* EMIT SIGNAL */ + + if (s) { + s->DropReferences.connect (_spill_gone_connection, invalidator (*this), boost::bind (&Mixer_UI::spill_nothing, this), gui_context()); + _group_tabs->hide (); + } else { + _group_tabs->show (); } + redisplay_track_list (); +} + +void +Mixer_UI::spill_nothing () +{ + show_spill (boost::shared_ptr ()); } bool diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index 7992824b09..6af766ab6b 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -431,6 +431,9 @@ private: RouteProcessorSelection _selection; AxisViewSelection _axis_targets; + void spill_nothing (); + PBD::ScopedConnection _spill_gone_connection; + void vca_assign (boost::shared_ptr); void vca_unassign (boost::shared_ptr); -- cgit v1.2.3