-
- if ((send = boost::dynamic_pointer_cast<Send> (insert)) != 0) {
-
- SendUI *send_ui = new SendUI (send, *session);
-
- if (place == PreFader) {
- cleanup_pre_view();
- _pre_plugin_conn = send->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
- _active_pre_view = send_ui;
-
- pre_redir_hpane.add2 (*_active_pre_view);
- pre_redir_hpane.show_all();
- }
- else {
- cleanup_post_view();
- _post_plugin_conn = send->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
- _active_post_view = send_ui;
-
- post_redir_hpane.add2 (*_active_post_view);
- post_redir_hpane.show_all();
- }
- } else if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
+
+ if ((boost::dynamic_pointer_cast<InternalSend> (proc)) != 0) {
+ cleanup_view();
+ _processor.reset ((Processor*) 0);
+ update_title();
+ return;
+ } else if ((send = boost::dynamic_pointer_cast<Send> (proc)) != 0) {
+
+ SendUI *send_ui = new SendUI (this, send, _session);
+
+ cleanup_view();
+ send->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 = send_ui;
+
+ redir_hpane.add (*_active_view);
+ redir_hpane.show_all();
+
+ } 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.add (*_active_view);
+ redir_hpane.show_all();
+
+ } else if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (proc)) != 0) {