summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2023-04-25 08:57:22 +0800
committerYuri Sizov <yuris@humnom.net>2023-04-26 14:48:18 +0200
commit389045c691aec6d0331a1b7c19e610fdc860b881 (patch)
tree78e021bb589a0cea79073db30d6f29f6d2e03100 /editor
parent4c8946c0801972d45079e7e87136d846a4a7e85e (diff)
Fix inconsistent file dialog settings usage
* Project Manager ignores display mode settings. * EditorFileDialog's default display mode and show hidden files settings are not updated when corresponding editor settings change. (cherry picked from commit 2ccc9e14563977ae9707d6511727f5d6a20b0f9b)
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp3
-rw-r--r--editor/project_manager.cpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 359d17b277..87ca642be5 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -749,6 +749,9 @@ void EditorNode::_notification(int p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
scene_tabs->set_tab_close_display_policy((TabBar::CloseButtonDisplayPolicy)EDITOR_GET("interface/scene_tabs/display_close_button").operator int());
+ FileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EDITOR_GET("filesystem/file_dialog/display_mode").operator int());
bool theme_changed =
EditorSettings::get_singleton()->check_changed_settings_in_group("interface/theme") ||
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 4f10fe5108..dd3e6c4db3 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -2685,6 +2685,7 @@ ProjectManager::ProjectManager() {
DisplayServer::get_singleton()->window_set_title(VERSION_NAME + String(" - ") + TTR("Project Manager", "Application"));
EditorFileDialog::set_default_show_hidden_files(EDITOR_GET("filesystem/file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EDITOR_GET("filesystem/file_dialog/display_mode").operator int());
int swap_cancel_ok = EDITOR_GET("interface/editor/accept_dialog_cancel_ok_buttons");
if (swap_cancel_ok != 0) { // 0 is auto, set in register_scene based on DisplayServer.