Preserve project tree state on refresh

Project tree tries to preserve subfolder expansion state and selected
item when refreshing