summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'facetracknoir/ui.cpp')
-rw-r--r--facetracknoir/ui.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index eb6cf7e1..43358f1b 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -21,6 +21,13 @@
# include <windows.h>
#endif
+template<typename t>
+static QList<t> sorted(QList<t> xs)
+{
+ std::sort(xs.begin(), xs.end(), [&](const t& a, const t& b) { return a->name.toLower() < b->name.toLower(); });
+ return xs;
+}
+
MainWindow::MainWindow() :
pose_update_timer(this),
kbd_quit(QKeySequence("Ctrl+Q"), this),
@@ -39,7 +46,7 @@ MainWindow::MainWindow() :
connect(ui.btnShortcuts, SIGNAL(clicked()), this, SLOT(show_options_dialog()));
connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showProtocolSettings()));
- for (auto x : modules.protocols())
+ for (auto x : sorted(modules.protocols()))
ui.iconcomboProtocol->addItem(x->icon, x->name);
refresh_config_list();