summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-10-14 11:14:38 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-10-14 11:14:38 -0400
commita901f28c6287ff99444d6a8afe67b71531a5f7d0 (patch)
treec2c70d42a74f681ed9a0ca19dd5716c8e3cf5cd4
parentd9058499afa3fc84a6746f290c4b87501a4dcb4b (diff)
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.
-rw-r--r--gtk2_ardour/processor_box.cc20
1 files changed, 19 insertions, 1 deletions
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> processor, bool us
boost::shared_ptr<PortInsert> 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<AudioTrack>(_route) != 0) {
if (boost::dynamic_pointer_cast<AudioTrack> (_route)->freeze_state() == AudioTrack::Frozen) {
@@ -2581,7 +2593,13 @@ ProcessorBox::generate_processor_title (boost::shared_ptr<PluginInsert> 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.