summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-27 01:42:49 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-27 01:42:49 +0000
commit6304261b980419eaafde84bc32ff5e8f1c7aa236 (patch)
tree1261360e5eb22f7539a1a0afcc2d760ea017b7ad /libs/ardour/session_state.cc
parent0082e3364f7682ff41df52305cfff2cf7a861ef3 (diff)
Re-work layering in possibly debatable ways. Sketchy docs in doc/layering.
git-svn-id: svn://localhost/ardour2/branches/3.0@11088 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 7d6f44b786..532d010680 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -974,7 +974,27 @@ int
Session::load_options (const XMLNode& node)
{
LocaleGuard lg (X_("POSIX"));
- config.set_variables (node);
+
+ /* Copy the node */
+ XMLNode node_copy = node;
+
+ /* XXX: evil hack: fix up sessions from before the layering alterations
+ (during A3 beta)
+ */
+
+ XMLNodeList children = node_copy.children ();
+ for (XMLNodeIterator i = children.begin(); i != children.end(); ++i) {
+ XMLProperty* p = (*i)->property (X_("name"));
+ if (p && p->name() == X_("name") && p->value() == X_("layer-model") ) {
+ p = (*i)->property (X_("value"));
+ if (p && p->value() == X_("MoveAddHigher")) {
+ (*i)->add_property (X_("value"), X_("AddOrBoundsChangeHigher"));
+ }
+ }
+ }
+
+ config.set_variables (node_copy);
+
return 0;
}