Skip to content

Commit

Permalink
Merge pull request godotengine#94172 from jsjtxietian/open-save
Browse files Browse the repository at this point in the history
Prevent confirm button being override to "Open" when in save file mode
  • Loading branch information
akien-mga committed Jul 11, 2024
2 parents cead80e + 4a4968f commit 383a6e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editor/gui/editor_file_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 383a6e4

Please sign in to comment.