Merge pull request #74710 from yedpodtrzitko/yed/layers-clear-filter

Clear filter in Project Settings when opening Layer Names
This commit is contained in:
Rémi Verschelde 2023-03-10 14:07:02 +01:00
commit d8e242cba8
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 8 additions and 4 deletions

View file

@ -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)) {

View file

@ -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();
}

View file

@ -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() {

View file

@ -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();