For each selected node that is a Group and that is Ungroupable, change all of their member nodes to be members of the group that the selected group node is in. (If the selected group node is a top-level node, i.e. not a member of any group node, its members become top-level nodes too.) All of those selected group nodes are deleted. All of the reparented member nodes are selected. This also raises the Diagram.SelectionUngroupedEvent. All of the changes are performed in an undoable edit.