From 106024330230fca331e2f611fec42ec1f4f43e5a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 11 Jun 2011 15:35:34 +0000 Subject: 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 --- libs/ardour/processor.cc | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) (limited to 'libs/ardour/processor.cc') diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc index bb004c313d..bf4a8ea6cb 100644 --- a/libs/ardour/processor.cc +++ b/libs/ardour/processor.cc @@ -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::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; -- cgit v1.2.3