diff options
author | yedpodtrzitko <yed@vanyli.net> | 2023-03-10 18:10:05 +0800 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-14 13:59:04 +0100 |
commit | 5824967f2f5d2835f7216dcb5d2d4139f4b8608b (patch) | |
tree | cb820457897ffa54da69885f5b4d175d93f2e328 | |
parent | 7ac80569b31ea428e1d5017895ceceaf9d22557c (diff) |
clear filter input in Project Settings when opening Layers
(cherry picked from commit e13bcf5b845fba1dbb2bbb02c8f14e7d3733a188)
-rw-r--r-- | editor/editor_properties.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 6 | ||||
-rw-r--r-- | editor/project_settings_editor.h | 2 |
4 files changed, 8 insertions, 4 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 801f1ca5b6..b8e491b243 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1210,7 +1210,7 @@ void EditorPropertyLayers::_button_pressed() { void EditorPropertyLayers::_menu_pressed(int p_menu) { if (p_menu == grid->layer_count) { - ProjectSettingsEditor::get_singleton()->popup_project_settings(); + ProjectSettingsEditor::get_singleton()->popup_project_settings(true); ProjectSettingsEditor::get_singleton()->set_general_page(basename); } else { if (grid->value & (1 << p_menu)) { diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 2639765283..151d46b673 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -1398,7 +1398,7 @@ void EditorAssetLibrary::_asset_open() { } void EditorAssetLibrary::_manage_plugins() { - ProjectSettingsEditor::get_singleton()->popup_project_settings(); + ProjectSettingsEditor::get_singleton()->popup_project_settings(true); ProjectSettingsEditor::get_singleton()->set_plugins_page(); } diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 374ce98d63..c8fbd76f69 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -45,7 +45,7 @@ void ProjectSettingsEditor::connect_filesystem_dock_signals(FileSystemDock *p_fs localization_editor->connect_filesystem_dock_signals(p_fs_dock); } -void ProjectSettingsEditor::popup_project_settings() { +void ProjectSettingsEditor::popup_project_settings(bool p_clear_filter) { // Restore valid window bounds or pop up at default size. Rect2 saved_size = EditorSettings::get_singleton()->get_project_metadata("dialog_bounds", "project_settings", Rect2()); if (saved_size != Rect2()) { @@ -62,6 +62,10 @@ void ProjectSettingsEditor::popup_project_settings() { autoload_settings->update_autoload(); plugin_settings->update_plugins(); import_defaults_editor->clear(); + + if (p_clear_filter) { + search_box->clear(); + } } void ProjectSettingsEditor::queue_save() { diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h index 31f644da74..eaac7e8c5a 100644 --- a/editor/project_settings_editor.h +++ b/editor/project_settings_editor.h @@ -116,7 +116,7 @@ protected: public: static ProjectSettingsEditor *get_singleton() { return singleton; } - void popup_project_settings(); + void popup_project_settings(bool p_clear_filter = false); void set_plugins_page(); void set_general_page(const String &p_category); void update_plugins(); |