Updates to track selected items in the tree.