- } else {
- /* its an insert, though we don't know what kind yet. */
-
- PluginInsert *plugin_insert;
- PortInsert *port_insert;
-
- if ((plugin_insert = dynamic_cast<PluginInsert *> (insert)) != 0) {
-
- PluginUI *plugin_ui = new PluginUI (session->engine(), *plugin_insert, true);
-
- if (place == PreFader) {
- cleanup_pre_view();
- _pre_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PreFader));
- plugin_ui->start_updating (0);
- _active_pre_view = plugin_ui;
- pre_redir_hpane.pack2 (*_active_pre_view);
- pre_redir_hpane.show_all();
- }
- else {
- cleanup_post_view();
- _post_plugin_conn = plugin_insert->plugin().GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PostFader));
- plugin_ui->start_updating (0);
- _active_post_view = plugin_ui;
- post_redir_hpane.pack2 (*_active_post_view);
- post_redir_hpane.show_all();
- }
-
- } else if ((port_insert = dynamic_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 (mem_fun(*this, &RouteParams_UI::redirect_going_away));
- _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 (mem_fun(*this, &RouteParams_UI::redirect_going_away));
- _active_post_view = portinsert_ui;
- post_redir_hpane.pack2 (*_active_post_view);
- portinsert_ui->redisplay();
- post_redir_hpane.show_all();
- }
- }
-
- }