- } 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;
+ } else if ((retrn = boost::dynamic_pointer_cast<Return> (proc)) != 0) {
+
+ ReturnUI *return_ui = new ReturnUI (this, retrn, _session);
+
+ cleanup_view();
+ retrn->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 = return_ui;
+
+ redir_hpane.add2 (*_active_view);
+ redir_hpane.show_all();
+
+ } else if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (proc)) != 0) {
+
+ GenericPluginUI *plugin_ui = new GenericPluginUI (plugin_insert, true);
+
+ cleanup_view();
+ plugin_insert->plugin()->DropReferences.connect (_processor_going_away_connection, invalidator (*this), boost::bind (&RouteParams_UI::plugin_going_away, this, PreFader), gui_context());
+ plugin_ui->start_updating (0);
+ _active_view = plugin_ui;
+
+ 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();