EditorFileDialog
's current_path
/current_file
does not select files for FILE_MODE_OPEN_FILE
/OPEN_FILES
/OPEN_ANY
, but FileDialog
works as expected.
#86819
Labels
Tested versions
Not reproducible in Godot 3.5.3.stable
Reproducible in Godot 4.2.1.stable
System information
Linux 6.6.7-arch1-1
Issue description
Setting
current_path
/current_file
does not select a file inEditorFileDialog
for_OPEN_FILE
,_OPEN_FILES
,_OPEN_ANY
, but_SAVE_FILE
works.In contrast,
FileDialog
'scurrent_path
/current_file
works as expected.Findings
This is caused by calling
file->set_text("")
inEditorFileDialog::update_dir
. Line was introduced here: #51478, and brought up again here #81226This change "resolves" the issue, but you must also move
current_path = ...
afterpopup_centered()
unlike the MRP. Because_post_popup
also callsupdate_dir
,current_file
is reset onpopup_centered()
.Removing
file->set_text("")
is not a good option because now switching directories doesn't clear the file name line edit.4.2.1 Editor plugin:
This issue doesn't really apply to
FILE_MODE_OPEN_DIR
as much as other enum variants.Steps to reproduce
current_path = "res://project.godot"
.EditorFileDialog
withFILE_MODE_SAVE_FILE
,project.godot
is selected.FileDialog
withFILE_MODE_OPEN_FILE
,project.godot
is selected.Minimal reproduction project (MRP)
Not reproducible but 3.5.3 test project godot3_file_dialogs.zip
4.2.1 file_dialogs.zip
The text was updated successfully, but these errors were encountered: