Order OSD elements in alphabetical order (#1485)

Order OSD elements in alphabetical order
10.7.0-preview
Michael Keller 2019-06-12 22:46:16 +12:00 committed by GitHub
commit bb72a44f84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -2275,7 +2275,19 @@ TABS.osd.initialize = function (callback) {
}))
);
}
$displayFields.append($field);
// Insert in alphabetical order
let added = false;
$displayFields.children().each(function() {
if ($(this).text() > $field.text()) {
$(this).before($field);
added = true;
return false;
}
});
if(!added) {
$displayFields.append($field);
}
}
GUI.switchery();