diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/template_utils.h | 5 | ||||
-rw-r--r-- | libs/ardour/template_utils.cc | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/ardour/template_utils.h b/libs/ardour/ardour/template_utils.h index f556e2c068..a865e87210 100644 --- a/libs/ardour/ardour/template_utils.h +++ b/libs/ardour/ardour/template_utils.h @@ -24,6 +24,7 @@ #include <string> #include <vector> +#include "ardour/utils.h" #include "ardour/libardour_visibility.h" namespace ARDOUR { @@ -39,6 +40,10 @@ namespace ARDOUR { std::string path; std::string description; std::string modified_with; + + bool operator < (const TemplateInfo& other) const { + return cmp_nocase_utf8 (name, other.name) < 0; + } }; LIBARDOUR_API void find_route_templates (std::vector<TemplateInfo>& template_names); diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index f6b6c59fbc..4b8d5b2b78 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -131,6 +131,7 @@ find_session_templates (vector<TemplateInfo>& template_names, bool read_xml) template_names.push_back (rti); } + std::sort(template_names.begin(), template_names.end()); } void |