Project tree state preservation

Just burned over half an hour figuring this out, but I pulled it off: The project tree now preserves subfolder expansion state and current selection when refreshing. That was starting to drive me nuts. :-)