add selection event , resets modified flag for subtrees