From 259fdaf48e3f84baedce388d7bbd6891a568def0 Mon Sep 17 00:00:00 2001 From: Aaron Record Date: Sun, 7 Nov 2021 14:50:29 -0700 Subject: [PATCH] Make "Last Modified" the default sorting order for the Project Manager --- editor/editor_settings.cpp | 2 +- editor/project_manager.cpp | 4 ++-- editor/project_manager.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 739fc0e4f59..25e190f442e 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -707,7 +707,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { /* Extra config */ - EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Name,Path,Last Edited") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "project_manager/sorting_order", 0, "Last Edited,Name,Path") if (p_extra_config.is_valid()) { if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) { diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 150dde79e5a..19dd7d569e7 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1099,7 +1099,7 @@ struct ProjectListComparator { }; ProjectList::ProjectList() { - _order_option = FilterOption::NAME; + _order_option = FilterOption::EDIT_DATE; _scroll_children = memnew(VBoxContainer); _scroll_children->set_h_size_flags(Control::SIZE_EXPAND_FILL); add_child(_scroll_children); @@ -2492,9 +2492,9 @@ ProjectManager::ProjectManager() { hb->add_child(filter_option); Vector sort_filter_titles; + sort_filter_titles.push_back(TTR("Last Edited")); sort_filter_titles.push_back(TTR("Name")); sort_filter_titles.push_back(TTR("Path")); - sort_filter_titles.push_back(TTR("Last Edited")); for (int i = 0; i < sort_filter_titles.size(); i++) { filter_option->add_item(sort_filter_titles[i]); diff --git a/editor/project_manager.h b/editor/project_manager.h index f45d34d461d..c663b81fae3 100644 --- a/editor/project_manager.h +++ b/editor/project_manager.h @@ -42,9 +42,9 @@ class ProjectDialog; class ProjectList; enum FilterOption { + EDIT_DATE, NAME, PATH, - EDIT_DATE, }; class ProjectManager : public Control {