major, substantive reworking of how we store GUI information (visibility, height) for automation data. old design stored (insufficient) identifying information plus actual data in a GUI-only XML node; new scheme adds GUI data via extra_xml node to each AutomationControl object. reworked public/private methods for showing/hiding TimeAxisView objects; changed labelling of automation tracks to just show the name of the controlled parameter - more info can be viewed in the tooltip for the track headers. NOTE: Session file format ALTERED. No data loss but track visibility may be different than previous ardour3 versions

git-svn-id: svn://localhost/ardour2/branches/3.0@9703 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-06-11 15:35:34 +00:00
parent 7468fdb9ca
commit 1060243302
30 changed files with 284 additions and 499 deletions

View file

@ -123,21 +123,7 @@ Processor::state (bool full_state)
if (full_state) {
XMLNode& automation = Automatable::get_automation_xml_state();
if (!automation.children().empty()
|| !automation.properties().empty()
|| !_visible_controls.empty()) {
stringstream sstr;
for (set<Evoral::Parameter>::iterator x = _visible_controls.begin();
x != _visible_controls.end(); ++x) {
if (x != _visible_controls.begin()) {
sstr << ' ';
}
sstr << (*x).id();
}
automation.add_property ("visible", sstr.str());
if (!automation.children().empty() || !automation.properties().empty()) {
node->add_child_nocopy (automation);
}
}
@ -206,6 +192,8 @@ Processor::set_state (const XMLNode& node, int version)
XMLNodeList nlist = node.children();
XMLNodeIterator niter;
Stateful::save_extra_xml (node);
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
if ((*niter)->name() == X_("Automation")) {
@ -218,25 +206,6 @@ Processor::set_state (const XMLNode& node, int version)
set_automation_xml_state (*(*niter), Evoral::Parameter(PluginAutomation));
}
if ((prop = (*niter)->property ("visible")) != 0) {
uint32_t what;
stringstream sstr;
_visible_controls.clear ();
sstr << prop->value();
while (1) {
sstr >> what;
if (sstr.fail()) {
break;
}
// FIXME: other automation types?
mark_automation_visible (Evoral::Parameter(PluginAutomation, 0, what), true);
}
}
} else if ((*niter)->name() == "Extra") {
_extra_xml = new XMLNode (*(*niter));
} else if ((*niter)->name() == "Redirect") {
if ( !(legacy_active = (*niter)->property("active"))) {
error << string_compose(_("No %1 property flag in element %2"), "active", (*niter)->name()) << endl;