Reset hover and selected states when switching nodes.