internal void ChildSortingOrderChanged(GObject child, int oldValue, int newValue)
{
if (newValue == 0)
{
_sortingChildCount--;
SetChildIndex(child, _children.Count);
}
else
{
if (oldValue == 0)
_sortingChildCount++;
int oldIndex = _children.IndexOf(child);
int index = GetInsertPosForSortingChild(child);
if (oldIndex < index)
_SetChildIndex(child, oldIndex, index - 1);
else
_SetChildIndex(child, oldIndex, index);
}
}