소스 검색

Merge pull request #29112 from hbina/fix_auto_ordering

Fixed scripts list ordering despite being disabled
Rémi Verschelde 6 년 전
부모
커밋
147ff2095d
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      editor/plugins/script_editor_plugin.cpp

+ 9 - 1
editor/plugins/script_editor_plugin.cpp

@@ -1558,7 +1558,15 @@ struct _ScriptEditorItemData {
 
 	bool operator<(const _ScriptEditorItemData &id) const {
 
-		return category == id.category ? sort_key < id.sort_key : category < id.category;
+		if (category == id.category) {
+			if (sort_key == id.sort_key) {
+				return index < id.index;
+			} else {
+				return sort_key < id.sort_key;
+			}
+		} else {
+			return category < id.category;
+		}
 	}
 };