- } else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (insert)) != 0) {
-
- PortInsertUI *portinsert_ui = new PortInsertUI (*session, port_insert);
-
- if (place == PreFader) {
- cleanup_pre_view();
- _pre_plugin_conn = port_insert->GoingAway.connect (bind (
- mem_fun(*this, &RouteParams_UI::redirect_going_away),
- insert));
- _active_pre_view = portinsert_ui;
- pre_redir_hpane.pack2 (*_active_pre_view);
- portinsert_ui->redisplay();
- pre_redir_hpane.show_all();
- } else {
- cleanup_post_view();
- _post_plugin_conn = port_insert->GoingAway.connect (bind (
- mem_fun(*this, &RouteParams_UI::redirect_going_away),
- insert));
- _active_post_view = portinsert_ui;
- post_redir_hpane.pack2 (*_active_post_view);
- portinsert_ui->redisplay();
- post_redir_hpane.show_all();
- }
- }
-
- if (place == PreFader) {
- _pre_processor = insert;
- } else {
- _post_processor = insert;
+ redir_hpane.pack2 (*_active_view);
+ redir_hpane.show_all();
+
+ } else if ((port_insert = boost::dynamic_pointer_cast<PortInsert> (proc)) != 0) {
+
+ PortInsertUI *portinsert_ui = new PortInsertUI (this, _session, port_insert);
+
+ cleanup_view();
+ port_insert->DropReferences.connect (_processor_going_away_connection, invalidator (*this), boost::bind (&RouteParams_UI::processor_going_away, this, boost::weak_ptr<Processor> (proc)), gui_context());
+ _active_view = portinsert_ui;
+
+ redir_hpane.pack2 (*_active_view);
+ portinsert_ui->redisplay();
+ redir_hpane.show_all();