Skip to content

Commit 4a4968f

Browse files
committed
Prevent confirm button being override to "Open" when in save file mode
1 parent 42e5b3a commit 4a4968f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

editor/gui/editor_file_dialog.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,10 @@ void EditorFileDialog::_item_selected(int p_item) {
634634
file->set_text(d["name"]);
635635
_request_single_thumbnail(get_current_dir().path_join(get_current_file()));
636636

637-
// FILE_MODE_OPEN_ANY can alternate this text depending on what's selected.
638-
set_ok_button_text(TTR("Open"));
637+
if (mode != FILE_MODE_SAVE_FILE) {
638+
// FILE_MODE_OPEN_ANY can alternate this text depending on what's selected.
639+
set_ok_button_text(TTR("Open"));
640+
}
639641
} else if (mode == FILE_MODE_OPEN_DIR || mode == FILE_MODE_OPEN_ANY) {
640642
file->set_text("");
641643
set_ok_button_text(TTR("Select This Folder"));

0 commit comments

Comments
 (0)