Sort the profiles with ignore case (#2080)

Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
This commit is contained in:
Daniel Girtler 2023-09-21 19:48:49 +10:00 committed by GitHub
parent 0e93d5b468
commit c75ae97f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -371,6 +371,7 @@ class ProfileHandler:
Helper function to perform a profile selection
"""
options = {p.name: p for p in selectable_profiles}
options = dict((k, v) for k, v in sorted(options.items(), key=lambda x: x[0].upper()))
warning = str(_('Are you sure you want to reset this setting?'))
@ -388,7 +389,7 @@ class ProfileHandler:
allow_reset=allow_reset,
allow_reset_warning_msg=warning,
multi=multi,
sort=True,
sort=False,
preview_command=self.preview_text,
preview_size=0.5
).run()