aboutsummaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorianb962018-02-14 11:32:33 -0500
committerHein-Pieter van Braam2018-02-19 22:26:29 +0100
commit2f87e7ffe97d5e290a107b3ddfef961f4d71ee17 (patch)
tree63e774b9130186e2ef015b3bcfbfa6ef0b1f37c0 /editor
parent12da8dcdeb9fbb6162f85d9e752f6938b1811935 (diff)
downloadgodot-2f87e7ffe97d5e290a107b3ddfef961f4d71ee17.tar.gz
godot-2f87e7ffe97d5e290a107b3ddfef961f4d71ee17.tar.zst
godot-2f87e7ffe97d5e290a107b3ddfef961f4d71ee17.zip
option to disable sort in script list
(cherry picked from commit e1778fb921a7800e50fd464cc16eaae6faa19ee9)
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_editor_plugin.cpp5
-rw-r--r--editor/plugins/script_editor_plugin.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 9b4bf65ab..9d7df4cd9 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1572,6 +1572,9 @@ void ScriptEditor::_update_script_names() {
case SORT_BY_PATH: {
sd.sort_key = path;
} break;
+ case SORT_BY_NONE: {
+ sd.sort_key = "";
+ } break;
}
switch (display_as) {
@@ -2915,7 +2918,7 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size", 15);
EDITOR_DEF("text_editor/open_scripts/current_script_background_color", Color(1, 1, 1, 0.3));
EDITOR_DEF("text_editor/open_scripts/group_help_pages", true);
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path"));
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/sort_scripts_by", PROPERTY_HINT_ENUM, "Name,Path,None"));
EDITOR_DEF("text_editor/open_scripts/sort_scripts_by", 0);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "text_editor/open_scripts/list_script_names_as", PROPERTY_HINT_ENUM, "Name,Parent Directory And Name,Full Path"));
EDITOR_DEF("text_editor/open_scripts/list_script_names_as", 0);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index e60e4cf8c..0f7c0c56c 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -165,6 +165,7 @@ class ScriptEditor : public PanelContainer {
enum ScriptSortBy {
SORT_BY_NAME,
SORT_BY_PATH,
+ SORT_BY_NONE
};
enum ScriptListName {