summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-01-30 01:08:57 +0100
committerRobin Gareus <robin@gareus.org>2020-01-30 01:08:57 +0100
commit6452f62d64cfc473a4fce9a027d31ed56368d8cb (patch)
tree56054730502666d0ba9ac8f2324342adb8911244 /libs/ardour/route.cc
parent51d2bb36ceec7386370f1999952b04bec291f312 (diff)
Cont'd work on loading old route templates
This builds on top of 51d2bb: * v6 routes templates/states have a version per <Route> * older route-states are assumed to be from ardour-5 Stateful::loading_state_version 3002, unless specified otherwise
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 0b684f560c..a358201b80 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2494,9 +2494,13 @@ Route::state (bool save_template)
std::string modified_with = string_compose ("%1 %2", PROGRAM_NAME, revision);
child->set_property("modified-with", modified_with);
- node->set_property("version", CURRENT_SESSION_FILE_VERSION);
}
+ /* This is needed for templates and when duplicating routes, in which case
+ * the route-state is directly passed to new_route_from_template().
+ */
+ node->set_property("version", CURRENT_SESSION_FILE_VERSION);
+
node->set_property (X_("id"), id ());
node->set_property (X_("name"), name());
node->set_property (X_("default-type"), _default_type);
@@ -2590,9 +2594,6 @@ Route::state (bool save_template)
int
Route::set_state (const XMLNode& node, int version)
{
- /* when loading a template, use the version of the Route (if available) */
- node.get_property (X_("version"), version);
-
if (version < 3000) {
return set_state_2X (node, version);
}