Fix switch custom -> generic plugin UI (amend e635571f2f)

This commit is contained in:
Robin Gareus 2022-10-11 02:40:26 +02:00
parent 0bf8e7d8cf
commit bd898a68df
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 3 additions and 1 deletions

View File

@ -4684,7 +4684,7 @@ ProcessorWindowProxy::ProcessorWindowProxy (string const & name, ProcessorBox* b
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (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<ProcessorWindowProxy*> (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));

View File

@ -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;
};