From d61efbee3edcf08c345d95ef8bb21c4f8c541358 Mon Sep 17 00:00:00 2001 From: Nikolaus Gullotta Date: Tue, 26 Feb 2019 09:42:30 -0600 Subject: [PATCH] Route::save_as_template() needs call state() with true, and add modified-with node to state for template-files --- libs/ardour/route.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index e4e790b089..7f18d40ddf 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -71,6 +71,7 @@ #include "ardour/port_insert.h" #include "ardour/processor.h" #include "ardour/profile.h" +#include "ardour/revision.h" #include "ardour/route.h" #include "ardour/route_group.h" #include "ardour/send.h" @@ -2410,6 +2411,16 @@ Route::state (bool save_template) XMLNode *node = new XMLNode("Route"); ProcessorList::iterator i; +#ifdef MIXBUS + if(save_template) { + XMLNode* child = node->add_child("ProgramVersion"); + child->set_property("created-with", _session.created_with); + + std::string modified_with = string_compose ("%1 %2", PROGRAM_NAME, revision); + child->set_property("modified-with", modified_with); + } +#endif + node->set_property (X_("id"), id ()); node->set_property (X_("name"), name()); node->set_property (X_("default-type"), _default_type); @@ -4214,7 +4225,7 @@ Route::save_as_template (const string& path, const string& name, const string& d std::string state_dir = path.substr (0, path.find_last_of ('.')); // strip template_suffix PBD::Unwinder uw (_session._template_state_dir, state_dir); - XMLNode& node (state (false)); + XMLNode& node (state (true)); node.set_property (X_("name"), name); node.remove_nodes (X_("description"));