From d8663b1a702086728d012194ab6dd50cfdffe85a Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 7 Oct 2022 21:52:25 +0200 Subject: [PATCH] Sort unused palette commands alphabetically --- editor/editor_command_palette.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/editor_command_palette.h b/editor/editor_command_palette.h index b3e84771d0e..15200552b41 100644 --- a/editor/editor_command_palette.h +++ b/editor/editor_command_palette.h @@ -66,7 +66,11 @@ class EditorCommandPalette : public ConfirmationDialog { struct CommandHistoryComparator { _FORCE_INLINE_ bool operator()(const CommandEntry &A, const CommandEntry &B) const { - return A.last_used > B.last_used; + if (A.last_used == B.last_used) { + return A.display_name < B.display_name; + } else { + return A.last_used > B.last_used; + } } };