diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-11 15:35:34 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-11 15:35:34 +0000 |
commit | 106024330230fca331e2f611fec42ec1f4f43e5a (patch) | |
tree | 56342e0e544be5223d2fa360caaec80ac0fe6fa4 /gtk2_ardour/route_ui.cc | |
parent | 7468fdb9ca9892cec9b298690bf0edf3655d6453 (diff) |
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
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 44 |
1 files changed, 4 insertions, 40 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 7750f6c399..525013ecaa 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1306,18 +1306,10 @@ RouteUI::ensure_xml_node () new_xml_node->add_property ((*i)->name().c_str (), (*i)->value().c_str ()); } - XMLNodeList old_children = xml_node->children (); - for (XMLNodeConstIterator i = old_children.begin(); i != old_children.end(); ++i) { - XMLNode* new_child = new XMLNode (AutomationTimeAxisView::state_node_name); - new_child->add_property (X_("automation-id"), (*i)->name()); - - XMLPropertyList old_props = (*i)->properties (); - for (XMLPropertyIterator j = old_props.begin(); j != old_props.end(); ++j) { - new_child->add_property ((*j)->name().c_str (), (*j)->value().c_str ()); - } - - new_xml_node->add_child_nocopy (*new_child); - } + /* we can't fix up the automation track nodes, + * because the data is no longer stored + * per-route, but per Controllable. + */ _route->add_extra_xml (*new_xml_node); xml_node = new_xml_node; @@ -1326,34 +1318,6 @@ RouteUI::ensure_xml_node () } } -XMLNode* -RouteUI::get_automation_child_xml_node (Evoral::Parameter param) -{ - ensure_xml_node (); - - XMLNodeList kids = xml_node->children(); - XMLNodeConstIterator iter; - - const string sym = ARDOUR::EventTypeMap::instance().to_symbol(param); - - for (iter = kids.begin(); iter != kids.end(); ++iter) { - - if ((*iter)->name() == AutomationTimeAxisView::state_node_name) { - XMLProperty* type = (*iter)->property("automation-id"); - if (type && type->value() == sym) { - return *iter; - } - } - } - - // Didn't find it, make a new one - XMLNode* child = new XMLNode (AutomationTimeAxisView::state_node_name); - child->add_property("automation-id", sym); - xml_node->add_child_nocopy (*child); - - return child; -} - int RouteUI::set_color_from_route () { |