diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-11 23:48:13 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-11 23:48:13 +0100 |
commit | c0ad0b0acf2cf326b7aa145f5c3dc61b7dcbcaba (patch) | |
tree | 307f157ef6f6ba449f06800b5b0baf3338c5c588 /editor/project_settings_editor.cpp | |
parent | 058202e9602c1e3bb06e7978f3082e552b3c2e85 (diff) | |
parent | 690fd153567e176251068ddac2aa02ce270c1473 (diff) | |
download | redot-engine-c0ad0b0acf2cf326b7aa145f5c3dc61b7dcbcaba.tar.gz |
Merge pull request #87870 from ryevdokimov/remove-unnecessary-focus-methods
Remove unnecessary focus methods and directly bind to `set_close_on_escape`
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r-- | editor/project_settings_editor.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 57fbbecb60..70e8484a78 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -600,14 +600,6 @@ void ProjectSettingsEditor::_update_theme() { } } -void ProjectSettingsEditor::_input_filter_focused() { - set_close_on_escape(false); -} - -void ProjectSettingsEditor::_input_filter_unfocused() { - set_close_on_escape(true); -} - void ProjectSettingsEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { @@ -740,8 +732,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { action_map_editor->connect("action_removed", callable_mp(this, &ProjectSettingsEditor::_action_removed)); action_map_editor->connect("action_renamed", callable_mp(this, &ProjectSettingsEditor::_action_renamed)); action_map_editor->connect("action_reordered", callable_mp(this, &ProjectSettingsEditor::_action_reordered)); - action_map_editor->connect(SNAME("filter_focused"), callable_mp(this, &ProjectSettingsEditor::_input_filter_focused)); - action_map_editor->connect(SNAME("filter_unfocused"), callable_mp(this, &ProjectSettingsEditor::_input_filter_unfocused)); + action_map_editor->connect(SNAME("filter_focused"), callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(false)); + action_map_editor->connect(SNAME("filter_unfocused"), callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(true)); tab_container->add_child(action_map_editor); localization_editor = memnew(LocalizationEditor); |