bug fix

Fixed error when event is edited in tree and next sibling is not a
valid tree item (end of list or end of sub-tree)