From 0c59ba649ef11236fca34b2a976fcee7309b9eb5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 14 Oct 2017 17:00:45 +0200 Subject: [PATCH] Save 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. --- gtk2_ardour/processor_box.cc | 29 +++++++++-------------------- 1 file 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 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 (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 w) if (!p || p->pinmgr_proxy ()) { return; } + if (!boost::dynamic_pointer_cast (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"));