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
No known key found for this signature in database
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); boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (p);
if (pi) { 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); ProcessorWindowProxy* me = dynamic_cast<ProcessorWindowProxy*> (self);
if (!me->is_custom) { if (!me->is_custom) {
return; return;
@ -4796,6 +4796,7 @@ ProcessorWindowProxy::get (bool create)
void void
ProcessorWindowProxy::show_the_right_window (bool show_not_toggle) ProcessorWindowProxy::show_the_right_window (bool show_not_toggle)
{ {
_unmap_connection.disconnect ();
if (_window && (is_custom != want_custom)) { if (_window && (is_custom != want_custom)) {
/* drop existing window - wrong type */ /* drop existing window - wrong type */
set_state_mask (Gtkmm2ext::WindowProxy::StateMask (state_mask () & ~WindowProxy::Size)); set_state_mask (Gtkmm2ext::WindowProxy::StateMask (state_mask () & ~WindowProxy::Size));

View file

@ -112,6 +112,7 @@ private:
bool want_custom; bool want_custom;
void processor_going_away (); void processor_going_away ();
sigc::connection _unmap_connection;
PBD::ScopedConnection going_away_connection; PBD::ScopedConnection going_away_connection;
PBD::ScopedConnectionList gui_connections; PBD::ScopedConnectionList gui_connections;
}; };