diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-19 20:37:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 20:37:15 +0100 |
commit | 5efbb08a7a8cc7bcec05645088d3e2f5e87216aa (patch) | |
tree | 93a2cff2bf124b3a2f7ec37ced358b74002cad47 | |
parent | 48850d4077f4a21ac27e6b1f969f6887440b3244 (diff) | |
parent | e1778fb921a7800e50fd464cc16eaae6faa19ee9 (diff) |
Merge pull request #16697 from ianb96/script_list_no_sort
Add Option to disable sort in script list
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 5 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index bd8c502a80..a2641738f3 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1576,6 +1576,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) { @@ -2926,7 +2929,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 e98a4c97a6..a5531c96b5 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 { |