Fix/tweak various DSP-load window issues
authorRobin Gareus <robin@gareus.org>
Tue, 25 Sep 2018 15:46:58 +0000 (17:46 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 25 Sep 2018 16:01:22 +0000 (18:01 +0200)
* update when window is visible and session-changes
* drop connections to prevent multiple callbacks
* catch session-deletion, skip updates

gtk2_ardour/plugin_dspload_window.cc

index e9b54380d25217dc71f79f53effcb92d27075d77..9819c751b0e6641326c3b706f2c0b3e97222c9f1 100644 (file)
@@ -62,6 +62,8 @@ PluginDSPLoadWindow::set_session (Session* s)
        ArdourWindow::set_session (s);
        if (!s) {
                drop_references ();
+       } else if (is_visible ()) {
+               refill_processors ();
        }
 }
 
@@ -107,12 +109,18 @@ PluginDSPLoadWindow::drop_references ()
                        delete *child;
                }
        }
+       _route_connections.drop_connections ();
+       _processor_connections.drop_connections ();
 }
 
 void
 PluginDSPLoadWindow::refill_processors ()
 {
        drop_references ();
+       if (!_session || _session->deletion_in_progress()) {
+               /* may be called from session d'tor, removing monitor-section w/plugin */
+               return;
+       }
        RouteList routes = _session->get_routelist ();
        for (RouteList::const_iterator i = routes.begin(); i != routes.end(); ++i) {