summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-24 17:45:33 +0200
committerGitHub <noreply@github.com>2019-05-24 17:45:33 +0200
commit147ff2095d8c7b52400654bdb31671909af9da47 (patch)
tree07c72913414b9a263225021a1ee24a43d7cdf545 /editor
parent3887fb3e6aca45af3767f85c15f625003f4f6208 (diff)
parente1816ee0cb64edf3e9929edd9142ccbe7d2105e0 (diff)
Merge pull request #29112 from hbina/fix_auto_ordering
Fixed scripts list ordering despite being disabled
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_editor_plugin.cpp10
1 files changed, 9 insertions, 1 deletions
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;
+ }
}
};