FileChooser - Linux

I’m seeing something odd with the filechooser on Linux. I create one like this:

FileChooser fc ("Open File", settings->getMostRecentFile().getParentDirectory(), "*txt");

If I call fc.browseForFileToSave(false) everything works as expected, and I only see txt files in the file browser dialogue. If, on the other hand I call fc.browseForFileToOpen() I see all files regardless of extension. In order to sort them I have to manually select the extension in file browser dialogue.

Is there a workaround to for this problem? If there is an issue with the native file browser I would expect the same problem when browsing for files to save?

I can’t reproduce this - I get the expected result for both calls. Which Linux distribution are you using?

I’m using Ubuntu with the Xfce desktop as provided by Xubuntu. Thanks for checking this. I guess it’s an oddity then with my distro.