From 389045c691aec6d0331a1b7c19e610fdc860b881 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 25 Apr 2023 08:57:22 +0800 Subject: 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) --- editor/editor_node.cpp | 3 +++ editor/project_manager.cpp | 1 + 2 files changed, 4 insertions(+) (limited to 'editor') 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. -- cgit v1.2.3