summaryrefslogtreecommitdiff
path: root/gtk2_ardour/processor_box.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-10-14 17:00:45 +0200
committerRobin Gareus <robin@gareus.org>2017-10-18 04:15:15 +0200
commit0c59ba649ef11236fca34b2a976fcee7309b9eb5 (patch)
tree61b93c54e30282aa303e01be255cec01f5de345d /gtk2_ardour/processor_box.cc
parent4c1feac16e19ff3368c70ee1234bc8d6e6ad6901 (diff)
Save <UI> state for plugins only.
Only PluginInserts have UIs and PinMgs and unique IDs. Other processors may not be saved explicitly, [re-]created dynamically, change ID (eg. capturing processor) and clutter up the list. TODO: removing a processor should also remove its UI state.
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r--gtk2_ardour/processor_box.cc29
1 files changed, 9 insertions, 20 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index b512e11144..f30564d263 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -2627,28 +2627,14 @@ ProcessorBox::maybe_add_processor_to_ui_list (boost::weak_ptr<Processor> w)
if (p->window_proxy()) {
return;
}
-
- /* not on the list; add it */
-
- string loc;
-#if 0 // is this still needed? Why?
- if (_parent_strip) {
- if (_parent_strip->mixer_owned()) {
- loc = X_("M");
- } else {
- loc = X_("R");
- }
- } else {
- loc = X_("P");
+ if (!boost::dynamic_pointer_cast<PluginInsert> (p)) {
+ return;
}
-#else
- loc = X_("P");
-#endif
ProcessorWindowProxy* wp = new ProcessorWindowProxy (
- string_compose ("%1-%2-%3", loc, _route->id(), p->id()),
- this,
- w);
+ string_compose ("P-%1-%2", _route->id(), p->id()),
+ this,
+ w);
const XMLNode* ui_xml = _session->extra_xml (X_("UI"));
@@ -2667,9 +2653,12 @@ ProcessorBox::maybe_add_processor_pin_mgr (boost::weak_ptr<Processor> w)
if (!p || p->pinmgr_proxy ()) {
return;
}
+ if (!boost::dynamic_pointer_cast<PluginInsert> (p)) {
+ return;
+ }
PluginPinWindowProxy* wp = new PluginPinWindowProxy (
- string_compose ("PM-%2-%3", _route->id(), p->id()), w);
+ string_compose ("PM-%1-%2", _route->id(), p->id()), w);
wp->set_session (_session);
const XMLNode* ui_xml = _session->extra_xml (X_("UI"));