diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 2c2a3db492..f938961c96 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -4684,7 +4684,7 @@ ProcessorWindowProxy::ProcessorWindowProxy (string const & name, ProcessorBox* b boost::shared_ptr pi = boost::dynamic_pointer_cast (p); if (pi) { - signal_unmap.connect (sigc::bind ([] (ProxyBase* self, PluginType type) { + _unmap_connection = signal_unmap.connect (sigc::bind ([] (ProxyBase* self, PluginType type) { ProcessorWindowProxy* me = dynamic_cast (self); if (!me->is_custom) { return; @@ -4796,6 +4796,7 @@ ProcessorWindowProxy::get (bool create) void ProcessorWindowProxy::show_the_right_window (bool show_not_toggle) { + _unmap_connection.disconnect (); if (_window && (is_custom != want_custom)) { /* drop existing window - wrong type */ set_state_mask (Gtkmm2ext::WindowProxy::StateMask (state_mask () & ~WindowProxy::Size)); diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index e7536a8226..914d5e5030 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -112,6 +112,7 @@ private: bool want_custom; void processor_going_away (); + sigc::connection _unmap_connection; PBD::ScopedConnection going_away_connection; PBD::ScopedConnectionList gui_connections; };