save controls state in PluginInsert state nodes (needed to restore MIDI bindings, not done yet)
git-svn-id: svn://localhost/ardour2/branches/3.0@8108 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
28791ac5e6
commit
2bd721d1cc
@ -198,7 +198,7 @@ PluginInsert::set_automatable ()
|
|||||||
param.set_range (desc.lower, desc.upper, _plugins.front()->default_value(i->id()), desc.toggled);
|
param.set_range (desc.lower, desc.upper, _plugins.front()->default_value(i->id()), desc.toggled);
|
||||||
can_automate (param);
|
can_automate (param);
|
||||||
boost::shared_ptr<AutomationList> list(new AutomationList(param));
|
boost::shared_ptr<AutomationList> list(new AutomationList(param));
|
||||||
add_control (boost::shared_ptr<AutomationControl>(new PluginControl(this, param, list)));
|
add_control (boost::shared_ptr<AutomationControl> (new PluginControl(this, param, list)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -685,6 +685,13 @@ PluginInsert::state (bool full)
|
|||||||
node.add_property("count", string_compose("%1", _plugins.size()));
|
node.add_property("count", string_compose("%1", _plugins.size()));
|
||||||
node.add_child_nocopy (_plugins[0]->get_state());
|
node.add_child_nocopy (_plugins[0]->get_state());
|
||||||
|
|
||||||
|
for (Controls::iterator c = controls().begin(); c != controls().end(); ++c) {
|
||||||
|
boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl> ((*c).second);
|
||||||
|
if (ac) {
|
||||||
|
node.add_child_nocopy (ac->get_state());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user