浏览代码

Merge pull request #67047 from KoBeWi/_aacdeelmmnoptt

Sort unused palette commands alphabetically
Rémi Verschelde 2 年之前
父节点
当前提交
18177828ad
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      editor/editor_command_palette.h

+ 5 - 1
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;
+			}
 		}
 	};