diff options
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index d3412f0387..5cd9b576a5 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -4014,7 +4014,7 @@ Route::set_plugin_state_dir (boost::weak_ptr<Processor> p, const std::string& d) } int -Route::save_as_template (const string& path, const string& name) +Route::save_as_template (const string& path, const string& name, const string& description) { 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); @@ -4022,6 +4022,14 @@ Route::save_as_template (const string& path, const string& name) XMLNode& node (state (false)); node.set_property (X_("name"), name); + if (!description.empty()) { + XMLNode* desc = new XMLNode(X_("description")); + XMLNode* desc_cont = new XMLNode(X_("content"), description); + desc->add_child_nocopy (*desc_cont); + + node.add_child_nocopy (*desc); + } + XMLTree tree; IO::set_name_in_state (*node.children().front(), name); |