FileBrowserComponent::useTreeView randomly closing subfolders

I get a strange behaviour with the FileBrowserComponent when using the flag FileBrowserComponent::useTreeView

on my Linux box (ubuntu 18.04) opened subfolders get automatically closed after a random time (a few seconds generally) or may be after some x11 events (like moving windows, moving the pointer, difficult to say).

this can be easily tested inserting this flag in examples/GUI/DialogsDemo.h (line 291)

this seems unrelated to the window manager (I tested on gnome and openbox, same results)

another way to put it would be
is it possible to modify the time it takes for the component to check if the underlying file system has changed ?

answering my own question, in FileBrowserComponent a timer is refreshing the content of the directory every 2000ms.

It would be nice that the refresh function does not change the state of the tree view (not closing subfolders, and keep current selection) or to have a simple way to deactivate this thread (could not find one).

otherwise a quick and dirty solution for getting back to a non-automatic refresh :

void FileBrowserComponent::refresh()