summaryrefslogtreecommitdiffstats
path: root/editor/project_settings_editor.cpp
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-12-21 12:48:59 +0100
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-12-21 12:48:59 +0100
commit3238d1124769eb2f07feada339ea50e026f0bb68 (patch)
tree799c169b76191677b588fbabb37f3268833264cf /editor/project_settings_editor.cpp
parent63f95c0e58e51ec2939e8b47803cb607fb35cadc (diff)
downloadredot-engine-3238d1124769eb2f07feada339ea50e026f0bb68.tar.gz
Fix closing project setting window with ESC while listening for input
This is done by disallowing ESC to be used for closing the window while the filter-LineEdit is focused.
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r--editor/project_settings_editor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index b406b2a1ce..b99a83a546 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -553,6 +553,14 @@ 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: {
@@ -683,6 +691,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));
tab_container->add_child(action_map_editor);
localization_editor = memnew(LocalizationEditor);