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,8 +2275,20 @@ TABS.osd.initialize = function (callback) {
}))
);
}
// 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();
// buffer the preview