Save/Use state-version with route templates
Currently using Ardour-5 route templates (state version "3002") with Ardour6 fails. As opposed to session-templates, Route templates were not versioned. This ensures future compatibility (and may allow to interpret unversioned templates as "3002")
This commit is contained in:
parent
015d4d3642
commit
51d2bb36ce
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user