store tree selection and selcect item after tree refresh