From a901f28c6287ff99444d6a8afe67b71531a5f7d0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 14 Oct 2013 11:14:38 -0400 Subject: use processor owner to set GUIs opened by a ProcessorBox, not current route name Since the GUIs remain open across changes in track selection for the editor mixer now, the current route name is not always correct as the owner/location of the Processor. --- gtk2_ardour/processor_box.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 0585d3792d..a22e991752 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -2104,6 +2104,18 @@ ProcessorBox::get_editor_window (boost::shared_ptr processor, bool us boost::shared_ptr port_insert; Window* gidget = 0; + /* This method may or may not return a Window, but if it does not it + * will modify the parent mixer strip appearance layout to allow + * "editing" the @param processor that was passed in. + * + * So for example, if the processor is an Amp (gain), the parent strip + * will be forced back into a model where the fader controls the main gain. + * If the processor is a send, then we map the send controls onto the + * strip. + * + * Plugins and others will return a window for control. + */ + if (boost::dynamic_pointer_cast(_route) != 0) { if (boost::dynamic_pointer_cast (_route)->freeze_state() == AudioTrack::Frozen) { @@ -2581,7 +2593,13 @@ ProcessorBox::generate_processor_title (boost::shared_ptr pi) maker += " ..."; } - return string_compose(_("%1: %2 (by %3)"), _route->name(), pi->name(), maker); + SessionObject* owner = pi->owner(); + + if (owner) { + return string_compose(_("%1: %2 (by %3)"), owner->name(), pi->name(), maker); + } else { + return string_compose(_("%2 (by %3)"), pi->name(), maker); + } } /** @param p Processor. -- cgit v1.2.3