From 17d69ed7bb8af1ce77b46cc9dedeba106a7153a5 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:18:51 +0200 Subject: [PATCH] Fix `EditorFileDialog` clears the file name on changing directory Fixes issues with assigning a name for files being saved --- editor/gui/editor_file_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index cf701f1e630..45c169d33b2 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -264,17 +264,17 @@ void EditorFileDialog::update_dir() { } dir->set_text(dir_access->get_current_dir(false)); - file->set_text(""); - // Disable "Open" button only when selecting file(s) mode. get_ok_button()->set_disabled(_is_open_should_be_disabled()); switch (mode) { case FILE_MODE_OPEN_FILE: case FILE_MODE_OPEN_FILES: + file->set_text(""); set_ok_button_text(TTR("Open")); break; case FILE_MODE_OPEN_ANY: case FILE_MODE_OPEN_DIR: + file->set_text(""); set_ok_button_text(TTR("Select Current Folder")); break; case FILE_MODE_SAVE_FILE: