Improved setUndoPoint()
BugFix: when deleting an object, it was sometime deleting a not selected
one