diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 25bd4a79ff..0109a36cea 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -606,7 +606,7 @@ ProcessorBox::processor_button_press_event (GdkEventButton *ev, ProcessorEntry* if (_session->engine().connected()) { /* XXX giving an error message here is hard, because we may be in the midst of a button press */ - edit_processor (processor); + toggle_edit_processor (processor); } ret = true; @@ -1548,7 +1548,7 @@ ProcessorBox::one_processor_can_be_edited () } void -ProcessorBox::edit_processor (boost::shared_ptr processor) +ProcessorBox::toggle_edit_processor (boost::shared_ptr processor) { boost::shared_ptr send; boost::shared_ptr retrn; @@ -1569,25 +1569,9 @@ ProcessorBox::edit_processor (boost::shared_ptr processor) return; } -#ifdef OLD_SEND_EDITING - SendUIWindow *send_ui; - - Window* w = get_processor_ui (send); - if (w == 0) { - send_ui = new SendUIWindow (send, _session); - send_ui->set_title (send->name()); - set_processor_ui (send, send_ui); - - } else { - send_ui = dynamic_cast (w); - } - - gidget = send_ui; -#else if (_parent_strip) { _parent_strip->show_send (send); } -#endif } else if ((retrn = boost::dynamic_pointer_cast (processor)) != 0) { @@ -1661,7 +1645,7 @@ ProcessorBox::edit_processor (boost::shared_ptr processor) if (gidget) { if (gidget->is_visible()) { - gidget->get_window()->raise (); + gidget->hide (); } else { gidget->show_all (); gidget->present (); @@ -1905,7 +1889,7 @@ ProcessorBox::rb_edit () return; } - _current_processor_box->for_selected_processors (&ProcessorBox::edit_processor); + _current_processor_box->for_selected_processors (&ProcessorBox::toggle_edit_processor); } void @@ -2042,5 +2026,5 @@ ProcessorWindowProxy::show () return; } - _processor_box->edit_processor (p); + _processor_box->toggle_edit_processor (p); } diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 05fac97579..971ad40176 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -173,7 +173,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void select_all_sends (); Gtk::Window* get_processor_ui (boost::shared_ptr) const; - void edit_processor (boost::shared_ptr); + void toggle_edit_processor (boost::shared_ptr); sigc::signal > ProcessorSelected; sigc::signal > ProcessorUnselected;