Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

[FileDialog] Ignore filename edit `text_submitted` action when "Open" button is disabled.

Pāvels Nadtočajevs7ca71593d636
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 580ebcd3c4a..3d15587cbde 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -457,6 +457,10 @@ void FileDialog::_push_history() {
}
void FileDialog::_action_pressed() {
+ if (_is_open_should_be_disabled()) {
+ return;
+ }
+
if (mode == FILE_MODE_OPEN_FILES) {
const Vector<String> files = get_selected_files();
if (!files.is_empty()) {