private void UpdateSelection()
{
bool flag = false;
if (!IsMyNode(CurrentNode))
CurrentNode = null;
if (!IsMyNode(_selectionStart))
_selectionStart = null;
for (int i = Selection.Count - 1; i >= 0; i--)
if (!IsMyNode(Selection[i]))
{
flag = true;
Selection.RemoveAt(i);
}
if (flag)
OnSelectionChanged();
}