summaryrefslogtreecommitdiff
path: root/gtk2_ardour/processor_box.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-03-25 11:10:58 +0100
committerRobin Gareus <robin@gareus.org>2015-03-25 11:10:58 +0100
commitb34f26a7d05877bfaf939b05dfce42489a158fa5 (patch)
tree6c92c45234c57300ab7a730c10b5c0afc0b5c259 /gtk2_ardour/processor_box.cc
parent29abc678dd338a65dd7240176e565678efc56d67 (diff)
retain Send control visibility state, fixes #6210
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r--gtk2_ardour/processor_box.cc17
1 files 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<Processor> 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<Send> (processor)) {
- /* Always show send controls */
+
+ if (mark_send_visible) {
e->show_all_controls ();
}