Save state before delete actions for undo