Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.
I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.