From fb930e8f47b64b168f675ad65627d05148babdd3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 22 Nov 2023 12:16:18 -0700 Subject: [PATCH] add invalidator() calls to MixerStrip as it connects to ParameterChanged when the surround bus is removed, it (probably erroneously) causes changes to the I/O routing for the auditioner, which will be delivered to anyone who cares via an RCConfiguration ParameterChanged signal. This will be emitted from a non-GUI thread, and so will not be handled synchronously. The GUI thread will first handle the notification that the surround bus was deleted, and that will include deleting the MixerStrip for the surround bus. But another call_slot() request will be pending to notify the now-deleted MixerStrip about the auditioner change. Adding invalidator() calls ensures that the deletion of the MixerStrip removes all of these pending call_slot() requests. --- gtk2_ardour/mixer_strip.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 2f8bc7a493..2c993a38ac 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -413,8 +413,8 @@ MixerStrip::init () parameter_changed (X_("mixer-element-visibility")); UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &MixerStrip::parameter_changed)); - Config->ParameterChanged.connect (_config_connection, MISSING_INVALIDATOR, boost::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); - _session->config.ParameterChanged.connect (_config_connection, MISSING_INVALIDATOR, boost::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); + Config->ParameterChanged.connect (_config_connection, invalidator (*this), boost::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); + _session->config.ParameterChanged.connect (_config_connection, invalidator (*this), boost::bind (&MixerStrip::parameter_changed, this, _1), gui_context()); //watch for mouse enter/exit so we can do some stuff signal_enter_notify_event().connect (sigc::mem_fun(*this, &MixerStrip::mixer_strip_enter_event ));