From f297e9fa5155772ac0127607d45db2bb7f3df553 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 28 Mar 2010 19:07:23 +0000 Subject: lincoln's patch to get loading 2.X sessions to work better git-svn-id: svn://localhost/ardour2/branches/3.0@6804 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/lv2_plugin.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libs/ardour/lv2_plugin.cc') diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index faaf41fd35..368c521d0b 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -352,7 +352,7 @@ LV2Plugin::has_editor() const } int -LV2Plugin::set_state(const XMLNode& node, int /*version*/) +LV2Plugin::set_state(const XMLNode& node, int version) { XMLNodeList nodes; XMLProperty *prop; @@ -368,8 +368,12 @@ LV2Plugin::set_state(const XMLNode& node, int /*version*/) return -1; } - nodes = node.children ("Port"); - + if (version < 3000){ + nodes = node.children ("port"); + } else { + nodes = node.children ("Port"); + } + for (iter = nodes.begin(); iter != nodes.end(); ++iter){ child = *iter; @@ -382,6 +386,7 @@ LV2Plugin::set_state(const XMLNode& node, int /*version*/) } map::iterator i = _port_indices.find(sym); + if (i != _port_indices.end()) { port_id = i->second; } else { -- cgit v1.2.3