summaryrefslogtreecommitdiff
path: root/gtk2_ardour/template_dialog.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/template_dialog.cc')
-rw-r--r--gtk2_ardour/template_dialog.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc
index 09adc2cb8e..696cb29dec 100644
--- a/gtk2_ardour/template_dialog.cc
+++ b/gtk2_ardour/template_dialog.cc
@@ -420,7 +420,12 @@ TemplateManager::save_template_desc ()
{
const string file_path = template_file (_current_selection);
- const string desc_txt = _description_editor.get_buffer()->get_text ();
+ string desc_txt = _description_editor.get_buffer()->get_text ();
+ string::reverse_iterator wss = desc_txt.rbegin();
+ while (wss != desc_txt.rend() && isspace (*wss)) {
+ desc_txt.erase (--(wss++).base());
+ }
+
_current_selection->set_value (_template_columns.description, desc_txt);
XMLTree tree;