summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Gullotta <nik@harrisonconsoles.com>2019-02-26 09:42:30 -0600
committerNikolaus Gullotta <nik@harrisonconsoles.com>2019-02-26 09:42:30 -0600
commitd61efbee3edcf08c345d95ef8bb21c4f8c541358 (patch)
tree6df2acb1af74db82e8a0b3228c94c40704e17f5b
parent7048d86d6c409a4c10fcbd9ee79bc7380a6c7caf (diff)
Route::save_as_template() needs call state() with true, and add modified-with node to state for template-files
-rw-r--r--libs/ardour/route.cc13
1 files changed, 12 insertions, 1 deletions
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<std::string> 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"));