diff options
author | Carl Hetherington <carl@carlh.net> | 2010-09-07 23:26:21 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-09-07 23:26:21 +0000 |
commit | 136b8ed74721957e9617885fe156e6b8657116bd (patch) | |
tree | be74d5cf34efff949f21bce2c54e57a5aef7ba8d /gtk2_ardour/route_ui.cc | |
parent | 5ce3409e5debaf9d42749cb69c544a09c550f43a (diff) |
Fix restore of fader automation from 2.X sessions.
git-svn-id: svn://localhost/ardour2/branches/3.0@7754 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r-- | gtk2_ardour/route_ui.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 60d6f5f263..4222b40a93 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1271,7 +1271,7 @@ RouteUI::ensure_xml_node () } XMLNode* -RouteUI::get_automation_child_xml_node (Evoral::Parameter param) +RouteUI::get_automation_child_xml_node (Evoral::Parameter param, int version) { ensure_xml_node (); @@ -1281,10 +1281,17 @@ RouteUI::get_automation_child_xml_node (Evoral::Parameter param) 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) + + if (version < 3000) { + if ((*iter)->name() == sym) { return *iter; + } + } else { + if ((*iter)->name() == AutomationTimeAxisView::state_node_name) { + XMLProperty* type = (*iter)->property("automation-id"); + if (type && type->value() == sym) + return *iter; + } } } |