Fixes segfault when clearSelection() is called with a new instance of FileDialog

The `static` keyword makes `view` is assigned once only.
If `firstFileDialog` is destructed and `newFileDialog->clearSelection()` is called. Then `view` would become a dangling pointer, which may cause segfault.