13
0

retain Send control visibility state, fixes #6210

This commit is contained in:
Robin Gareus 2015-03-25 11:10:58 +01:00
parent 29abc678dd
commit b34f26a7d0

View File

@ -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 ();
}