summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-07 22:22:25 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-07 22:22:25 +0200
commit18177828ad97286ca88cbdcfb763c967858d051b (patch)
tree92137c98457aa96a115cb8c43c0eaaef42272c48
parent39f9c4d229dfffe7ba4b00571e0cb4b65a36b0d5 (diff)
parentd8663b1a702086728d012194ab6dd50cfdffe85a (diff)
Merge pull request #67047 from KoBeWi/_aacdeelmmnoptt
Sort unused palette commands alphabetically
-rw-r--r--editor/editor_command_palette.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_command_palette.h b/editor/editor_command_palette.h
index b3e84771d0..15200552b4 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;
+ }
}
};