From b34f26a7d05877bfaf939b05dfce42489a158fa5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 25 Mar 2015 11:10:58 +0100 Subject: [PATCH] retain Send control visibility state, fixes #6210 --- gtk2_ardour/processor_box.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 70f4002198..3aec2e8c22 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -1721,14 +1721,25 @@ ProcessorBox::add_processor_to_display (boost::weak_ptr p) if (!send && !plugin_insert && !ext) e->set_selectable(false); + bool mark_send_visible = false; + if (send && _parent_strip) { + /* show controls of new sends by default */ + GUIObjectState& st = _parent_strip->gui_object_state (); + XMLNode* strip = st.get_or_add_node (_parent_strip->state_id ()); + assert (strip); + /* check if state exists, if not it must be a new send */ + if (!st.get_node(strip, e->state_id())) { + mark_send_visible = true; + } + } + /* Set up this entry's state from the GUIObjectState */ XMLNode* proc = entry_gui_object_state (e); if (proc) { e->set_control_state (proc); } - - if (boost::dynamic_pointer_cast (processor)) { - /* Always show send controls */ + + if (mark_send_visible) { e->show_all_controls (); }