Save state for later undo when adding a new point