98teg / NativeDialogs

Native Dialogs is a plugin for Godot that allows you to interact with OS-specific dialogs, such as notifications, messages and file dialogs.
MIT License
156 stars 8 forks source link

NativeFileDialog signal file_selected does not fire on FILE_MODE_OPEN_FILE #10

Closed tonebacas closed 1 year ago

tonebacas commented 1 year ago

The signal file_selected does not fire when you set the NativeFileDialog file mode to FILE_MODE_OPEN_FILE, and double-click a valid file. However, the signal files_selected does fire under the condition mentioned above.

Also, the signal file_selected does fire when you set file mode to FILE_MODE_SAVE_FILE.

I think the signal firing conditions, and the signal naming should be revised, since there is a lot of ambiguity and confusion around them.

I propose the following:

98teg commented 1 year ago

You are right, I'm not taking into consideration the mode selected when emitting the event. I would change it so that it depends on the selected mode:

However, I would stick to the naming convention, since I'm using the same as Godot's FileDialog.