From 11ef82954efa74dd281f950bd6f7a677296419ad Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 22 Feb 2019 22:33:01 +0100 Subject: [PATCH] Sort route-templates by name --- libs/ardour/template_utils.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index 4b8d5b2b78..d92dc32f52 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -134,6 +134,12 @@ find_session_templates (vector& template_names, bool read_xml) std::sort(template_names.begin(), template_names.end()); } +struct TemplateInfoSorter { + bool operator () (TemplateInfo const& a, TemplateInfo const& b) { + return a.name < b.name; + } +}; + void find_route_templates (vector& template_names) { @@ -182,6 +188,8 @@ find_route_templates (vector& template_names) template_names.push_back (rti); } + + std::sort (template_names.begin(), template_names.end (), TemplateInfoSorter ()); } }