From e1816ee0cb64edf3e9929edd9142ccbe7d2105e0 Mon Sep 17 00:00:00 2001 From: hbina085 Date: Wed, 22 May 2019 16:38:14 -0400 Subject: fixed problem where the script lists gets ordered even when ordering is disabled --- editor/plugins/script_editor_plugin.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 828abef9a9..38985a2b2c 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/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; + } } }; -- cgit v1.2.3