From 4a4968f7d8d3e9a683adadd4e98ef8f68f5104ec Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Wed, 10 Jul 2024 19:49:03 +0800 Subject: [PATCH] Prevent confirm button being override to "Open" when in save file mode --- editor/gui/editor_file_dialog.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index 3e94310c833..973c7a42279 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -634,8 +634,10 @@ void EditorFileDialog::_item_selected(int p_item) { file->set_text(d["name"]); _request_single_thumbnail(get_current_dir().path_join(get_current_file())); - // FILE_MODE_OPEN_ANY can alternate this text depending on what's selected. - set_ok_button_text(TTR("Open")); + if (mode != FILE_MODE_SAVE_FILE) { + // FILE_MODE_OPEN_ANY can alternate this text depending on what's selected. + set_ok_button_text(TTR("Open")); + } } else if (mode == FILE_MODE_OPEN_DIR || mode == FILE_MODE_OPEN_ANY) { file->set_text(""); set_ok_button_text(TTR("Select This Folder"));