You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user