Use the selected attribute for deselecting nodes and edges