maintain selection in refreshFileTree