Skip to content

Commit

Permalink
Fix EditorFileDialog clears the file name on changing directory
Browse files Browse the repository at this point in the history
Fixes issues with assigning a name for files being saved
  • Loading branch information
AThousandShips committed Sep 1, 2023
1 parent 80bfca2 commit 17d69ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/gui/editor_file_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 17d69ed

Please sign in to comment.