Simplified logic of handling selection changes