I think that the check and setup of the currently selected widget should take place outside the for loop. I also have the feelling that running the `_selected_changed` notification handler explicitly after the for loop instead of these two lines might be a good way of handling selection setup at the same place.