tudo-aqua / bgw

BoardGameWork
https://tudo-aqua.github.io/bgw/
Apache License 2.0
24 stars 16 forks source link

[bgw-gui] FileDialog extension filters not showing specified filetypes on opening #372

Open smilefx opened 1 year ago

smilefx commented 1 year ago

Describe the bug The FileDialog extension filters do not work as intended. Saving a file works fine (including setting the extensionFilters). Chosing to use mode = FileDialogMode.OPEN_FILE however does not display any files (not even ones matching the filter).

To Reproduce Steps to reproduce the behavior:

BoardGameApplication.showFileDialog(
    FileDialog(
        title = "Load file",
        mode = FileDialogMode.OPEN_FILE,
        extensionFilters = listOf(ExtensionFilter("Proprietary File Format", "pff"))
    )
)

Alternatively using a .pff in the filter doesn't work either:

BoardGameApplication.showFileDialog(
    FileDialog(
        title = "Load file",
        mode = FileDialogMode.OPEN_FILE,
        extensionFilters = listOf(ExtensionFilter("Proprietary File Format", ".pff"))
    )
)

Expected behavior Should list all files matching the given extension filter and not only folders.

Please complete the following information: