diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 0b67528ac9..0b684f560c 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2494,6 +2494,7 @@ 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); } node->set_property (X_("id"), id ()); @@ -2589,6 +2590,9 @@ 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); } diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index a4c26a7ffb..482c17c270 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -177,6 +177,8 @@ Track::set_state (const XMLNode& node, int version) return -1; } + node.get_property (X_("version"), version); + if (version >= 3000 && version < 6000) { if (XMLNode* ds_node = find_named_node (node, "Diskstream")) { std::string name;