From bd898a68df4f15d18336f8e3a12104ec3d1e8229 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 11 Oct 2022 02:40:26 +0200 Subject: [PATCH] Fix switch custom -> generic plugin UI (amend e635571f2f) --- gtk2_ardour/processor_box.cc | 3 ++- gtk2_ardour/processor_box.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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; };