The documentation states that the
on_FileDialog_file_selected() signal should fire only after the OK button is pressed or a file is double-clicked:
Event emitted when the user selects a file (double clicks it or presses the OK button).
However, when I click on a file the FileDialog disappears and the clicked file is not selected until I open the FileDialog a second time.
The code successfully loads and saves but I have to open the FileDialog twice for every operation.
Full project on Github
if $HUD/FileDialog.get_mode() == FileDialog.MODE_OPEN_FILE:
_poses = FileAccess.load(path)
elif $HUD/FileDialog.get_mode() == FileDialog.MODE_SAVE_FILE: